CWA-206 | fixed status bar text and icon colors for light and dark modes
Oleksandr Sobol committed
Jun 1, 2020 at 20:36 UTC
7daf74c9f563ff31ae7e8c0f94b7052567bfc341
1 file changed
+12
-3
lib/main.dart
+12
-3
@@ -190,8 +190,6 @@ class MaterialAppWithTheme extends StatelessWidget {
190
final syncStore = Provider.of<SyncStore>(context);
191
final balanceStore = Provider.of<BalanceStore>(context);
192
final theme = Provider.of<ThemeChanger>(context);
193
- final statusBarColor =
194
- settingsStore.isDarkTheme ? Colors.black : Colors.white;
193
final currentLanguage = Provider.of<Language>(context);
194
final contacts = Provider.of<Box<Contact>>(context);
195
final nodes = Provider.of<Box<Node>>(context);
@@ -199,8 +197,19 @@ class MaterialAppWithTheme extends StatelessWidget {
197
final transactionDescriptions =
198
Provider.of<Box<TransactionDescription>>(context);
199
200
+ final statusBarColor =
201
+ settingsStore.isDarkTheme ? Colors.black : Colors.white;
202
+ final statusBarBrightness =
203
+ settingsStore.isDarkTheme ? Brightness.light : Brightness.dark;
204
+ final statusBarIconBrightness =
205
+ settingsStore.isDarkTheme ? Brightness.light : Brightness.dark;
206
+
207
SystemChrome.setSystemUIOverlayStyle(
203
- SystemUiOverlayStyle(statusBarColor: statusBarColor));
208
+ SystemUiOverlayStyle(
209
+ statusBarColor: statusBarColor,
210
+ statusBarBrightness: statusBarBrightness,
211
+ statusBarIconBrightness: statusBarIconBrightness
212
+ ));
213
214
return MaterialApp(
215
debugShowCheckedModeBanner: false,