Srikant Hamsa
Srikant Hamsa

Reputation: 3

Make Flutter AppBar's Color Consistent

The screenshot of my flutter app shows the appbar to be in two distinct shades of the same colors. There's a darker grey and then there's a lighter grey. I want it to be in a single color, i.e., completely light grey or completely dark grey.

enter image description here

Upvotes: 0

Views: 46

Answers (1)

MohitJadav
MohitJadav

Reputation: 889

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
    systemNavigationBarColor: Colors.amber, // navigation bar color
    statusBarColor: Colors.white, // status bar color
    statusBarIconBrightness: Brightness.dark, // status bar icon color
    systemNavigationBarIconBrightness: Brightness.dark, // color of navigation controls
  ));
  runApp(MyApp());
}

This will help you to change color of status bar

Upvotes: 1

Related Questions