Time Duinen
Time Duinen

Reputation: 95

Flutter, AppBar Color change

enter image description here

Is there a way that the AppBars color can be changed through a gradient and opacity as an example? From something lighter to something darker to see the icons above the phone clearer.

Upvotes: 1

Views: 5242

Answers (2)

Ahmed Osama
Ahmed Osama

Reputation: 812

if I understand correctly you want to change the appbar color with one of these methods :

1) change AppBar color only witch will affect the background of appbar only

     appBar: AppBar(
    backgroundColor: PrimaryColor,
  ),

1) change primary App color swatch : witch will change all the colors of buttons , etc to a certain color including appbar

MaterialApp(
    primaryColor: Colors.red,

)

2) Switch to dark mode : witch will invert the colors of all app to dark mode

MaterialApp(
  title: title,
  theme: ThemeData.dark(),
)

Upvotes: 1

Time Duinen
Time Duinen

Reputation: 95

Fixed.

 appBar: AppBar(
            brightness: Brightness.light,
            backgroundColor: Colors.white,
            elevation: 0.0,

Upvotes: 3

Related Questions