状态栏修改背景色
- AppBar中brightness 设置
- brightness: Brightness.dark, // 设置状态栏的颜色,好像取反设置.
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('GridView', style: TextStyle(color: Colors.white)),
backgroundColor: Colors.black,
brightness: Brightness.dark, // 设置状态栏的颜色,好像取反设置.
),
body: Content6(),
backgroundColor: Colors.white,
),
);
}
}