ButtonThemeData constructor

const ButtonThemeData({
  1. ButtonTextTheme textTheme = ButtonTextTheme.normal,
  2. double minWidth = 88.0,
  3. double height = 36.0,
  4. EdgeInsetsGeometry? padding,
  5. ShapeBorder? shape,
  6. ButtonBarLayoutBehavior layoutBehavior = ButtonBarLayoutBehavior.padded,
  7. bool alignedDropdown = false,
  8. Color? buttonColor,
  9. Color? disabledColor,
  10. Color? focusColor,
  11. Color? hoverColor,
  12. Color? highlightColor,
  13. Color? splashColor,
  14. ColorScheme? colorScheme,
  15. MaterialTapTargetSize? materialTapTargetSize,
})

Create a button theme object that can be used with ButtonTheme or ThemeData.

The minWidth and height parameters must greater than or equal to zero.

The ButtonTheme's methods that have a MaterialButton parameter and have a name with a get prefix are used to configure a RawMaterialButton.

Implementation

const ButtonThemeData({
  this.textTheme = ButtonTextTheme.normal,
  this.minWidth = 88.0,
  this.height = 36.0,
  this._padding,
  this._shape,
  this.layoutBehavior = ButtonBarLayoutBehavior.padded,
  this.alignedDropdown = false,
  this._buttonColor,
  this._disabledColor,
  this._focusColor,
  this._hoverColor,
  this._highlightColor,
  this._splashColor,
  this.colorScheme,
  this._materialTapTargetSize,
}) : assert(minWidth >= 0.0),
     assert(height >= 0.0);