0

I changed the background color of the appBar in one of my screens. It's now white, but the device time display and icons like the wifi icon don't show. How can I change the color of these device icons?

This is what I have now: enter image description here

This is what I want to achieve enter image description here

Here is my appBar code

 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: () {},
                ),
              ],
            ),
LearnToday
  • 2,762
  • 9
  • 38
  • 67
  • 1
    Check this https://stackoverflow.com/questions/52489458/how-to-change-status-bar-color-in-flutter – hoangquyy Nov 15 '19 at 02:30
  • Does this answer your question? [How to change status bar color in Flutter?](https://stackoverflow.com/questions/52489458/how-to-change-status-bar-color-in-flutter) – chunhunghan Nov 15 '19 at 03:54

1 Answers1

1

Set the brightness property of the AppBar to Brightness.light. It will change all the status bar icons to a darker color.

Example-

AppBar(
  brightness: Barightness.light,
  //Rest of your code will remain same
)

Alternatively, if the AppBar has a dark backgroundColor, you can set it to Brightness.dark, to force the AppBar to have light colored icons.

bytesizedwizard
  • 5,529
  • 3
  • 17
  • 39