feat: match android navigation bar color to app bottom nav

This commit is contained in:
Michael Thomas 2023-08-30 22:50:23 -04:00
parent 513b2d2f14
commit 3f0342b6cb
3 changed files with 15 additions and 13 deletions

View File

@ -57,16 +57,7 @@ class _AppPageLayoutState extends State<AppPageLayout> {
Widget build(BuildContext context) {
return Scaffold(
body: AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
systemNavigationBarContrastEnforced: true,
statusBarIconBrightness: widget.darkStatusBar
? Brightness.dark
: Brightness.light,
statusBarBrightness: widget.darkStatusBar
? Brightness.light
: Brightness.dark,
),
value: constructOverlayStyle(dark: widget.darkStatusBar),
child: Container(
color: widget.backgroundColor ?? Colors.grey[100],
child: SafeArea(

View File

@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
import 'package:furman_now/src/routes/index.gr.dart';
import 'package:furman_now/src/screens/home/content.dart';
import 'package:furman_now/src/screens/home/state.dart';
import 'package:furman_now/src/utils/theme.dart';
import 'package:provider/provider.dart';
class HomeScreenProvider extends StatelessWidget {
@ -101,7 +102,7 @@ class _HomeScreenState extends State<HomeScreen> {
Widget build(BuildContext context) {
return Scaffold(
body: AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
value: constructOverlayStyle(),
child: Container(
color: const Color(0xffb7acc9),
child: SafeArea(

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
ThemeData _baseTheme = ThemeData(
@ -47,5 +48,14 @@ ThemeData myFurmanTheme = _baseTheme.copyWith(
textTheme: GoogleFonts.interTextTheme(_baseTheme.textTheme),
);
var furmanTextStyle = (TextStyle baseStyle) =>
GoogleFonts.inter(textStyle: baseStyle);
var furmanTextStyle =
(TextStyle baseStyle) => GoogleFonts.inter(textStyle: baseStyle);
SystemUiOverlayStyle constructOverlayStyle({bool dark = false}) {
return SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
systemNavigationBarContrastEnforced: true,
statusBarIconBrightness: dark ? Brightness.dark : Brightness.light,
statusBarBrightness: dark ? Brightness.light : Brightness.dark,
systemNavigationBarColor: Colors.grey.shade50);
}