From 7daf74c9f563ff31ae7e8c0f94b7052567bfc341 Mon Sep 17 00:00:00 2001 From: Oleksandr Sobol Date: Mon, 1 Jun 2020 20:36:25 +0300 Subject: [PATCH] CWA-206 | fixed status bar text and icon colors for light and dark modes --- lib/main.dart | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 3a311a545..916f19ca1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -190,8 +190,6 @@ class MaterialAppWithTheme extends StatelessWidget { final syncStore = Provider.of(context); final balanceStore = Provider.of(context); final theme = Provider.of(context); - final statusBarColor = - settingsStore.isDarkTheme ? Colors.black : Colors.white; final currentLanguage = Provider.of(context); final contacts = Provider.of>(context); final nodes = Provider.of>(context); @@ -199,8 +197,19 @@ class MaterialAppWithTheme extends StatelessWidget { final transactionDescriptions = Provider.of>(context); + final statusBarColor = + settingsStore.isDarkTheme ? Colors.black : Colors.white; + final statusBarBrightness = + settingsStore.isDarkTheme ? Brightness.light : Brightness.dark; + final statusBarIconBrightness = + settingsStore.isDarkTheme ? Brightness.light : Brightness.dark; + SystemChrome.setSystemUIOverlayStyle( - SystemUiOverlayStyle(statusBarColor: statusBarColor)); + SystemUiOverlayStyle( + statusBarColor: statusBarColor, + statusBarBrightness: statusBarBrightness, + statusBarIconBrightness: statusBarIconBrightness + )); return MaterialApp( debugShowCheckedModeBanner: false,