Home > Net >  Button theme works with RaisedButton (deprecated) but not witn ElevatedButton
Button theme works with RaisedButton (deprecated) but not witn ElevatedButton

Time:11-22

When I use buttonTheme it works with RaisedButton.

buttonTheme: ButtonThemeData(
  buttonColor: Colors.green.withAlpha(125),
),

But since RaisedButton is deprecated it does not work with ElevatedButton. So how to use it for ElevatedButton?

CodePudding user response:

You also have an elevatedButtonTheme property :

elevatedButtonTheme : ElevatedButtonThemeData(
  // ...
), 
  • Related