feat: match android navigation bar color to app bottom nav
This commit is contained in:
		| @@ -57,16 +57,7 @@ class _AppPageLayoutState extends State<AppPageLayout> { | |||||||
|   Widget build(BuildContext context) { |   Widget build(BuildContext context) { | ||||||
|     return Scaffold( |     return Scaffold( | ||||||
|       body: AnnotatedRegion<SystemUiOverlayStyle>( |       body: AnnotatedRegion<SystemUiOverlayStyle>( | ||||||
|         value: SystemUiOverlayStyle( |         value: constructOverlayStyle(dark: widget.darkStatusBar), | ||||||
|           statusBarColor: Colors.transparent, |  | ||||||
|           systemNavigationBarContrastEnforced: true, |  | ||||||
|           statusBarIconBrightness: widget.darkStatusBar |  | ||||||
|             ? Brightness.dark |  | ||||||
|             : Brightness.light, |  | ||||||
|           statusBarBrightness: widget.darkStatusBar |  | ||||||
|               ? Brightness.light |  | ||||||
|               : Brightness.dark, |  | ||||||
|         ), |  | ||||||
|         child: Container( |         child: Container( | ||||||
|           color: widget.backgroundColor ?? Colors.grey[100], |           color: widget.backgroundColor ?? Colors.grey[100], | ||||||
|           child: SafeArea( |           child: SafeArea( | ||||||
|   | |||||||
| @@ -4,6 +4,7 @@ import 'package:flutter/services.dart'; | |||||||
| import 'package:furman_now/src/routes/index.gr.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/content.dart'; | ||||||
| import 'package:furman_now/src/screens/home/state.dart'; | import 'package:furman_now/src/screens/home/state.dart'; | ||||||
|  | import 'package:furman_now/src/utils/theme.dart'; | ||||||
| import 'package:provider/provider.dart'; | import 'package:provider/provider.dart'; | ||||||
|  |  | ||||||
| class HomeScreenProvider extends StatelessWidget { | class HomeScreenProvider extends StatelessWidget { | ||||||
| @@ -101,7 +102,7 @@ class _HomeScreenState extends State<HomeScreen> { | |||||||
|   Widget build(BuildContext context) { |   Widget build(BuildContext context) { | ||||||
|     return Scaffold( |     return Scaffold( | ||||||
|       body: AnnotatedRegion<SystemUiOverlayStyle>( |       body: AnnotatedRegion<SystemUiOverlayStyle>( | ||||||
|         value: SystemUiOverlayStyle.light, |         value: constructOverlayStyle(), | ||||||
|         child: Container( |         child: Container( | ||||||
|           color: const Color(0xffb7acc9), |           color: const Color(0xffb7acc9), | ||||||
|           child: SafeArea( |           child: SafeArea( | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||||
|  | import 'package:flutter/services.dart'; | ||||||
| import 'package:google_fonts/google_fonts.dart'; | import 'package:google_fonts/google_fonts.dart'; | ||||||
|  |  | ||||||
| ThemeData _baseTheme = ThemeData( | ThemeData _baseTheme = ThemeData( | ||||||
| @@ -47,5 +48,14 @@ ThemeData myFurmanTheme = _baseTheme.copyWith( | |||||||
|   textTheme: GoogleFonts.interTextTheme(_baseTheme.textTheme), |   textTheme: GoogleFonts.interTextTheme(_baseTheme.textTheme), | ||||||
| ); | ); | ||||||
|  |  | ||||||
| var furmanTextStyle = (TextStyle baseStyle) => | var furmanTextStyle = | ||||||
|     GoogleFonts.inter(textStyle: baseStyle); |     (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); | ||||||
|  | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user