chore: Follow up fix systemuioverlaystyle

This commit is contained in:
Christian Pauly 2022-08-28 11:39:33 +02:00
commit dc0bd2f5b2
6 changed files with 25 additions and 39 deletions

View file

@ -58,9 +58,11 @@ abstract class FluffyThemes {
surfaceTintColor:
brightness == Brightness.light ? Colors.white : Colors.black,
shadowColor: Colors.black.withAlpha(64),
systemOverlayStyle: brightness == Brightness.light
? SystemUiOverlayStyle.dark
: SystemUiOverlayStyle.light,
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: brightness.reversed,
statusBarBrightness: brightness,
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
@ -70,3 +72,8 @@ abstract class FluffyThemes {
),
);
}
extension on Brightness {
Brightness get reversed =>
this == Brightness.dark ? Brightness.light : Brightness.dark;
}