ButtonTheme constructor

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

Creates a button theme.

Implementation

ButtonTheme({
  super.key,
  ButtonTextTheme textTheme = ButtonTextTheme.normal,
  ButtonBarLayoutBehavior layoutBehavior = ButtonBarLayoutBehavior.padded,
  double minWidth = 88.0,
  double height = 36.0,
  EdgeInsetsGeometry? padding,
  ShapeBorder? shape,
  bool alignedDropdown = false,
  Color? buttonColor,
  Color? disabledColor,
  Color? focusColor,
  Color? hoverColor,
  Color? highlightColor,
  Color? splashColor,
  ColorScheme? colorScheme,
  MaterialTapTargetSize? materialTapTargetSize,
  required super.child,
}) : assert(minWidth >= 0.0),
     assert(height >= 0.0),
     data = ButtonThemeData(
       textTheme: textTheme,
       minWidth: minWidth,
       height: height,
       padding: padding,
       shape: shape,
       alignedDropdown: alignedDropdown,
       layoutBehavior: layoutBehavior,
       buttonColor: buttonColor,
       disabledColor: disabledColor,
       focusColor: focusColor,
       hoverColor: hoverColor,
       highlightColor: highlightColor,
       splashColor: splashColor,
       colorScheme: colorScheme,
       materialTapTargetSize: materialTapTargetSize,
     );