Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to set the appBar color to be REALLY White?

I want my app bar to be really White, still using the material 3 design.
I’ve tried to use
backGroundColor: Colors.white
either in the ThemeData of the app or directly in the widget. Nothing changes.

Here my code:

  static ThemeData lightTheme = ThemeData(
    useMaterial3: true,
    brightness: Brightness.light,
    primaryColor: Colors.white,
    appBarTheme: const AppBarTheme(
      backgroundColor: Colors.white,
    ),
  );
}
return Scaffold(
       appBar: AppBar(
           elevation: 20,
           backgroundColor: Colors.white,
           title: Widget()
       )
      )

I don’t want that Grey color. I just want the White.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

>Solution :

I think when you remove the elevation and also set the tintColor to "white", this will give you white.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading