From 91d7a93575a78d2796bea41f555739c377b47603 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Thu, 16 Jan 2020 21:14:25 +0800 Subject: [PATCH] fix: material style --- lib/app.dart | 8 +++++++- lib/home.dart | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/app.dart b/lib/app.dart index c532bf3..3335733 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -16,7 +16,13 @@ class MyApp extends StatelessWidget { ); default: return MaterialApp( - theme: ThemeData(brightness: theme.brightness), + theme: ThemeData( + brightness: theme.brightness, + primaryColor: + theme.brightness == Brightness.dark ? null : Colors.white, + accentColor: theme.paletteOf(context).primary, + scaffoldBackgroundColor: theme.paletteOf(context).background, + ), home: Home(), ); } diff --git a/lib/home.dart b/lib/home.dart index 54b30be..36c27dd 100644 --- a/lib/home.dart +++ b/lib/home.dart @@ -141,7 +141,7 @@ class _HomeState extends State { return Scaffold( body: _buildScreen(active), bottomNavigationBar: BottomNavigationBar( - // selectedItemColor: theme.paletteOf(context).primary, + selectedItemColor: theme.paletteOf(context).primary, items: _navigationItems, currentIndex: active, type: BottomNavigationBarType.fixed,