opt & fix

- update make script (taget mac)
- only set system overlay once
This commit is contained in:
Junyuan Feng
2022-05-19 16:06:12 +08:00
parent 36d7dc7bb2
commit 0533766c1c
13 changed files with 72 additions and 57 deletions

View File

@@ -75,13 +75,9 @@ Widget buildSwitch(BuildContext context, StoreProperty<bool> prop,
void setTransparentNavigationBar(BuildContext context) {
if (Platform.isAndroid) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
systemNavigationBarColor: Colors.transparent,
systemNavigationBarContrastEnforced: true,
systemNavigationBarIconBrightness:
isDarkMode(context) ? Brightness.light : Brightness.dark,
));
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
systemNavigationBarColor: Colors.transparent,
systemNavigationBarContrastEnforced: true));
}
}