Reputation: 576
I have recently updated the Flutter version from 1.22.6 to 2.0.2. But now after I create a new flutter project (default counter app), the status bar icons are dark. They were light before migrating to 2.0.2:
How can it be fixed? I've tried to set the light statusBarIconBrightness in the AppBarTheme, but it doesn't work:
appBarTheme: AppBarTheme(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.light,
),
),
Upvotes: 0
Views: 691
Reputation: 539
You Should set statusBarColor
too
for dart statusBarColor you should use bright colors for brightness
AppBarTheme(color: Colors.blue,
brightness: Brightness.dark,
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.blue
))
Upvotes: 1
Reputation: 105
Try this
return MaterialApp(
theme: ThemeData(
appBarTheme: Theme.of(context).appBarTheme.copyWith(brightness: Brightness.dark,),
...
),
...
);
Upvotes: 0