我对这一切扑朔迷离。我到处搜索以找到解决此小问题的方法。有没有办法更改状态栏的颜色?另外,当我使用诸如colors.blue之类的颜色时,我可以看到状态栏中的文本质量不好。
谢谢
appBar: AppBar(
elevation : 0.0,
leading: IconButton(
icon: Icon(Icons.menu),
tooltip: 'Navigation menu',
onPressed: null,
),
actions: <Widget>[
IconButton(
icon: Icon(Icons.search),
tooltip: 'Search',
onPressed: null,
),
],
),
@Antoine基本上,您可以设置主题的亮度,也可以使用以下命令手动覆盖应用栏的亮度:
appBar: new AppBar(
title: new Text(widget.title),
brightness: Brightness.light, // or use Brightness.dark
),
请注意,这只会在白色和黑色状态文本颜色之间切换。
.dark
将使状态栏文字为白色,.light
而使状态栏文字为黑色
也许是为了获得更多自定义颜色,例如评论说您可以查看SystemChrome类。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句