其他分享
首页 > 其他分享> > [Flutter-23] 状态栏修改背景色

[Flutter-23] 状态栏修改背景色

作者:互联网

状态栏修改背景色

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,
      ),
    );
  }
}

标签:状态栏,brightness,23,取反,Colors,设置,Flutter,backgroundColor
来源: https://www.cnblogs.com/comefromchina/p/flutter-status-bar.html