skip to Main Content

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

Answers


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

    Login or Signup to reply.
  2. I think when you remove the elevation and also set the tintColor to "white", this will give you white.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search