I have changed from RaisedButton to ElevatedButton but now I have a problem with the highlightColor function. What is the highlightColor by the ElevatedButton in Flutter?
Asked
Active
Viewed 396 times
1 Answers
2
The equivalent would be something like this:
ElevatedButton(
onPressed: ...,
child: ...,
style: ButtonStyle(
overlayColor: MaterialStateProperty.all(Colors.red), //replace this with your desired color
),
)
You can play around with other parameters of ButtonStyle to achieve the desired effect.
kforjan
- 584
- 5
- 15