dart – Flutter – 当AppBar不存在时如何设置状态栏颜色

dart – Flutter – 当AppBar不存在时如何设置状态栏颜色,第1张

概述如何在AppBar不存在时设置状态栏颜色. I have tried this but not working. Widget build(BuildContext context) { SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark); return new Scaffold( body 如何在Appbar不存在时设置状态栏颜色.

I have trIEd this but not working.

Widget build(BuildContext context) {    SystemChrome.setsystemUIOverlayStyle(systemUIOverlayStyle.dark);    return new Scaffold(        body: new Container(        color: Uniquerycolors.colorBackground,child: new ListVIEw.builder(           itemCount: 7,itemBuilder: (BuildContext context,int index){             if (index == 0){               return addtopInfoSection();             }           },),);}

输出看起来像这样:

解决方法 简单地把它放在你的应用程序的构建功能中:

SystemChrome.setsystemUIOverlayStyle(systemUIOverlayStyle.dark.copyWith(  statusbarcolor: colors.blue,//or set color with: color(0xFF0000FF)));

此外,您可以设置有用的变量,如:statusbarIconBrightness,systemNavigationbarcolor或systemNavigationbardivIDercolor

总结

以上是内存溢出为你收集整理的dart – Flutter – 当AppBar不存在时如何设置状态栏颜色全部内容,希望文章能够帮你解决dart – Flutter – 当AppBar不存在时如何设置状态栏颜色所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/web/1002713.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存