MaterialButtonModifier constructor

const MaterialButtonModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. required VoidCallback? onPressed,
  5. VoidCallback? onLongPress,
  6. ValueChanged<bool>? onHighlightChanged,
  7. MouseCursor? mouseCursor,
  8. ButtonTextTheme? textTheme,
  9. Color? textColor,
  10. Color? disabledTextColor,
  11. Color? color,
  12. Color? disabledColor,
  13. Color? focusColor,
  14. Color? hoverColor,
  15. Color? highlightColor,
  16. Color? splashColor,
  17. Brightness? colorBrightness,
  18. double? elevation,
  19. double? focusElevation,
  20. double? hoverElevation,
  21. double? highlightElevation,
  22. double? disabledElevation,
  23. EdgeInsetsGeometry? padding,
  24. VisualDensity? visualDensity,
  25. ShapeBorder? shape,
  26. Clip clipBehavior = Clip.none,
  27. FocusNode? focusNode,
  28. bool autofocus = false,
  29. MaterialTapTargetSize? materialTapTargetSize,
  30. Duration? animationDuration,
  31. double? minWidth,
  32. double? height,
  33. bool enableFeedback = true,
})

Creates a Material Design button.

To create a custom Material button consider using TextButton, ElevatedButton, or OutlinedButton.

The autofocus and clipBehavior arguments must not be null. Additionally, elevation, hoverElevation, focusElevation, highlightElevation, and disabledElevation must be non-negative, if specified.

Implementation

const MaterialButtonModifier({
  super.key,
  super.child,
  super.modifierKey,
  required this.onPressed,
  this.onLongPress,
  this.onHighlightChanged,
  this.mouseCursor,
  this.textTheme,
  this.textColor,
  this.disabledTextColor,
  this.color,
  this.disabledColor,
  this.focusColor,
  this.hoverColor,
  this.highlightColor,
  this.splashColor,
  this.colorBrightness,
  this.elevation,
  this.focusElevation,
  this.hoverElevation,
  this.highlightElevation,
  this.disabledElevation,
  this.padding,
  this.visualDensity,
  this.shape,
  this.clipBehavior = Clip.none,
  this.focusNode,
  this.autofocus = false,
  this.materialTapTargetSize,
  this.animationDuration,
  this.minWidth,
  this.height,
  this.enableFeedback = true,
});