How to set the appBar color to be REALLY White?

39 views Asked by At

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.

enter image description here

2

There are 2 answers

0
Emsil Neumann On BEST ANSWER

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

1
Elmer Matthew On

Use Color.fromRGBO(255,255,255,255). It should work