Flutter 当appbar背景更改为白色时,如何更改时间和手机图标(如wifi颜色)
我在一个屏幕中更改了appBar的背景色。现在为白色,但设备时间显示和wifi图标等图标不显示。如何更改这些设备图标的颜色 这就是我现在拥有的: 这就是我想要实现的目标 这是我的应用程序条形码Flutter 当appbar背景更改为白色时,如何更改时间和手机图标(如wifi颜色),flutter,Flutter,我在一个屏幕中更改了appBar的背景色。现在为白色,但设备时间显示和wifi图标等图标不显示。如何更改这些设备图标的颜色 这就是我现在拥有的: 这就是我想要实现的目标 这是我的应用程序条形码 child: Scaffold( backgroundColor: KjobbersAppTheme.white, appBar: AppBar( elevation: 0.0, textThem
child: Scaffold(
backgroundColor: KjobbersAppTheme.white,
appBar: AppBar(
elevation: 0.0,
textTheme: TextTheme(
title: TextStyle(
color: Colors.grey,
fontSize: 20.0,
)),
backgroundColor: KjobbersAppTheme.white,
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: AppTheme.grey,
),
onPressed: () => Navigator.pop(context),
),
iconTheme: IconThemeData(color: Colors.grey, size: 20),
actions: <Widget>[
new IconButton(
icon: new Icon(Icons.search),
onPressed: () {},
),
new IconButton(
icon: new Icon(Icons.search),
onPressed: () {},
),
],
),
child:Scaffold(
背景颜色:KjobbersAppTheme.white,
appBar:appBar(
标高:0.0,
textTheme:textTheme(
标题:文本样式(
颜色:颜色。灰色,
字体大小:20.0,
)),
背景颜色:KjobbersAppTheme.white,
领先:IconButton(
图标:图标(
Icons.arrow_back,
颜色:AppTheme.grey,
),
onPressed:()=>Navigator.pop(上下文),
),
iconTheme:IconThemeData(颜色:Colors.gray,大小:20),
行动:[
新图标按钮(
图标:新图标(Icons.search),
按下:(){},
),
新图标按钮(
图标:新图标(Icons.search),
按下:(){},
),
],
),
将AppBar
的brightness
属性设置为brightness.light
。它会将所有状态栏图标更改为较暗的颜色
示例-
AppBar(
brightness: Barightness.light,
//Rest of your code will remain same
)
或者,如果
AppBar
的背景颜色为深色,则可以将其设置为亮度.dark
,以强制AppBar
具有浅色图标。检查此项是否回答了您的问题?