在使用MedieQuery适配全面屏安全区域以后,如何才能保持沉浸式状态栏,
来源:17-3 Flutter 全屏幕适配指南
魔法Programer
2019-09-04
通过SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle)已经实现沉浸式,然而适配以后状态栏就全黑了,
写回答
1回答
-
CrazyCodeBoy
2019-09-08
可参考:
///状态栏样式-沉浸式状态栏 _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); }
00
相似问题