I’ve been using Flutter for a couple of days and I implemented get API but my concern is when I scroll down the AppBar color changes to another color.
In my AppBar, I have just title and actions.
I want the AppBar doesn’t change it’s color. Thanks in advance for your guidance.
2
You can add your appBar color in this appBar property.
AppBar( // add your appBar color. surfaceTintColor: Colors.white, backgroundColor: Colors.white, foregroundColor: foregroundColor, shadowColor: shadowColor, ),
The Golden attribute that causes that problem is scrollUnderElevation ,set it to 0:
scrollUnderElevation
AppBar( scrollUnderElevation: 0, )
The problem has no correlation with the color of the AppBar.
Hope it helps you.
Click here to cancel reply.
2
Answers
You can add your appBar color in this appBar property.
The Golden attribute that causes that problem is
scrollUnderElevation
,set it to 0:The problem has no correlation with the color of the AppBar.
Hope it helps you.