采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
通过SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle)已经实现沉浸式,然而适配以后状态栏就全黑了,
可参考:
///状态栏样式-沉浸式状态栏 _statusBar() { //黑色沉浸式状态栏,基于SystemUiOverlayStyle.dark修改了statusBarColor SystemUiOverlayStyle uiOverlayStyle = SystemUiOverlayStyle( systemNavigationBarColor: Color(0xFF000000), systemNavigationBarDividerColor: null, statusBarColor: Colors.transparent, systemNavigationBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.dark, statusBarBrightness: Brightness.light, ); SystemChrome.setSystemUIOverlayStyle(uiOverlayStyle); }
登录后可查看更多问答,登录/注册
解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。
1.7k 4
2.0k 1
4.1k 5
1.8k 3
1.7k 5