1

enter image description here

So, I'm doing this Amazon clone application using flutter and want to make those two colours equal like same colours. Please Give me a solution to make them equal colours

appBar: AppBar(
          systemOverlayStyle: SystemUiOverlayStyle(
            // Status bar color
            statusBarColor: Colors.red,
          ),

I have tried this code in main.dart file but its not responding so, i'm expecting a good solution to make them same colour

Sai Kalyan
  • 11
  • 2

1 Answers1

0
  • Add this line in your main method
void main() {
  SystemChrome.setSystemUIOverlayStyle(
    const SystemUiOverlayStyle(
      systemNavigationBarColor: Colors.red, //bottom bar color
      statusBarColor: Colors.red, //top bar color
    ),
  );
  runApp(const MyApp());
}


Cavin Macwan
  • 1,183
  • 5
  • 12