FlutterUI开发-改变状态栏颜色

1:使用AppBar

 // brightness:关键代码

 appBar: AppBar(
          title: Text('appbar',style: TextStyle(color: Colors.black),),
          brightness: Brightness.light,
          backgroundColor: Colors.white,
),

2:未使用AppBar

单页设置更改状态栏颜色

   return AnnotatedRegion<SystemUiOverlayStyle>(
        value: SystemUiOverlayStyle.dark,
        child: Scaffold(
          resizeToAvoidBottomInset: false,
          body: Column(),
        )
    );
发布了55 篇原创文章 · 获赞 34 · 访问量 6589

猜你喜欢

转载自blog.csdn.net/qq_16123129/article/details/104171669