前言
ios 13 开启 dark model,flutter页面status bar文字一直是白色
1  | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);  | 
设置dark style 并没有用
SystemChrome
1  | static void setSystemUIOverlayStyle(SystemUiOverlayStyle style) {  | 
FlutterPlatformPlugin
1  | - (void)setSystemChromeSystemUIOverlayStyle:(NSDictionary*)message {  | 
engine 源码中 可以看到 没有 UIStatusBarStyleDarkContent
尝试 去掉 info.plist 中的 UIViewControllerBasedStatusBarAppearance
然后 监听 通知
1  | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appStatusBar:) name:@"io.flutter.plugin.platform.SystemChromeOverlayNotificationName" object:nil];  |