ElevatedButton highlightColor?

500 views Asked by At

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?

1

There are 1 answers

0
kforjan On BEST ANSWER

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.