Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8be7e61

Browse files
committed
Use iOS 13 dark content status bar style
1 parent e3b5d8e commit 8be7e61

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,17 @@ - (void)setSystemChromeSystemUIOverlayStyle:(NSDictionary*)message {
171171
return;
172172

173173
UIStatusBarStyle statusBarStyle;
174-
if ([style isEqualToString:@"Brightness.dark"])
174+
if ([style isEqualToString:@"Brightness.dark"]) {
175175
statusBarStyle = UIStatusBarStyleLightContent;
176-
else if ([style isEqualToString:@"Brightness.light"])
177-
statusBarStyle = UIStatusBarStyleDefault;
178-
else
176+
} else if ([style isEqualToString:@"Brightness.light"]) {
177+
if (@available(iOS 13, *)) {
178+
statusBarStyle = UIStatusBarStyleDarkContent;
179+
} else {
180+
statusBarStyle = UIStatusBarStyleDefault;
181+
}
182+
} else {
179183
return;
184+
}
180185

181186
NSNumber* infoValue = [[NSBundle mainBundle]
182187
objectForInfoDictionaryKey:@"UIViewControllerBasedStatusBarAppearance"];

0 commit comments

Comments
 (0)