// 状态栏字体白色 static const SystemUiOverlayStyle light = SystemUiOverlayStyle( systemNavigationBarColor: Color(0xFF000000), systemNavigationBarDividerColor: null, statusBarColor: null, systemNavigationBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.light, statusBarBrightness: Brightness.dark, );
// 状态栏字体黑色 static const SystemUiOverlayStyle dark = SystemUiOverlayStyle( systemNavigationBarColor: Color(0xFF000000), systemNavigationBarDividerColor: null, statusBarColor: null, systemNavigationBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.dark, statusBarBrightness: Brightness.light, );
2.在main.dart中 runApp()方法下写,这样就可以全局状态栏字体颜色都是白色了,如果不一样的页面可以直接将这个引入到需要的页面,改成其他的颜色
//白色 SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light);