We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
之前3.0版本也有这样的问题。在onPostResume 回调设置setStatusBarLightMode就可以了。现在flutter_boost升级到 5.0.1版本,这个设置也不起作用了,请问还有什么方法可以保持状态栏文字一直是黑色的吗?
Android
Flutter 3.16.5
flutter_boost 5.0.1
No
The text was updated successfully, but these errors were encountered:
有一个临时的解决方法,在打开的flutter页面的widget的initState里
void initState() { super.initState(); SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light); scheduleMicrotask(() { SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark); }); }
Sorry, something went wrong.
有一个临时的解决方法,在打开的flutter页面的widget的initState里 void initState() { super.initState(); SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light); scheduleMicrotask(() { SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark); }); }
这个是有效果,不过也回出现状态栏闪动的情况。 我现在的解决方法是,在继承FlutterBoostActivity类中,重写onUpdateSystemUiOverlays,注释掉super.onUpdateSystemUiOverlays() ` @OverRide protected void onUpdateSystemUiOverlays() { // super.onUpdateSystemUiOverlays();//状态栏颜色会变 LogUtil.e(TAG, "onUpdateSystemUiOverlays");
}`
PRmerge至了5.x的版本分支上,4.x分支目前没有。需要的自行Merge
No branches or pull requests
请描述遇到的问题,以及您所期望的正确的结果
之前3.0版本也有这样的问题。在onPostResume 回调设置setStatusBarLightMode就可以了。现在flutter_boost升级到 5.0.1版本,这个设置也不起作用了,请问还有什么方法可以保持状态栏文字一直是黑色的吗?
请说明如何操作会遇到上述问题
在下面填入关键复现代码
复现的平台
Android
Flutter SDK版本
Flutter 3.16.5
FlutterBoost版本
flutter_boost 5.0.1
是否延迟初始化FlutterBoost
No
解决方案
The text was updated successfully, but these errors were encountered: