ButtonThemeData constructor
Create a button theme object that can be used with ButtonTheme or ThemeData.
The textTheme
, minWidth
, height
, alignedDropDown
, and
layoutBehavior
parameters must not be null. 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 by RaisedButton,
OutlineButton, and FlatButton to configure a RawMaterialButton.
Implementation
const ButtonThemeData({
this.textTheme = ButtonTextTheme.normal,
this.minWidth = 88.0,
this.height = 36.0,
EdgeInsetsGeometry padding,
ShapeBorder shape,
this.layoutBehavior = ButtonBarLayoutBehavior.padded,
this.alignedDropdown = false,
Color buttonColor,
Color disabledColor,
Color highlightColor,
Color splashColor,
this.colorScheme,
MaterialTapTargetSize materialTapTargetSize,
}) : assert(textTheme != null),
assert(minWidth != null && minWidth >= 0.0),
assert(height != null && height >= 0.0),
assert(alignedDropdown != null),
assert(layoutBehavior != null),
_buttonColor = buttonColor,
_disabledColor = disabledColor,
_highlightColor = highlightColor,
_splashColor = splashColor,
_padding = padding,
_shape = shape,
_materialTapTargetSize = materialTapTargetSize;