状态栏或底部虚拟栏的颜色与显示

Posted by アライさん on 2020年12月14日

1
2
3
4
5
import'package:flutter/services.dart';
//只隐藏状态栏,显示底部栏
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
//恢复状态栏和底部栏
SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values);
1
2
//隐藏状态栏和底部栏
SystemChrome.setEnabledSystemUIOverlays([]);
1
2
3
4
5
6
//白色状态栏黑色图标文字  
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark,
statusBarBrightness: Brightness.light,
statusBarColor: Colors.white,
));