sgon00 sgon00 - 27 days ago 6
Dart Question

How to make device top panel (status bar) have the same background color as AppBar in flutter?

How to make device top panel (status bar) have the same background color as AppBar in flutter? The color of the device top panel is always darker than the AppBar backgroundColor. Thanks a lot.

Answer Source

On iOS, this is already true.

On Android, add the following to onCreate in MainActivity.java, after the call to super.onCreate(savedInstanceState);.

getWindow().setStatusBarColor(0x00000000);

This will override the default status bar color of 0x40000000, which is set in the onCreate method of FlutterActivityDelegate.

enter image description here