MaterialButtonModifier constructor
const
MaterialButtonModifier({
- Key? key,
- Widget? child,
- Key? modifierKey,
- required VoidCallback? onPressed,
- VoidCallback? onLongPress,
- ValueChanged<
bool> ? onHighlightChanged, - MouseCursor? mouseCursor,
- ButtonTextTheme? textTheme,
- Color? textColor,
- Color? disabledTextColor,
- Color? color,
- Color? disabledColor,
- Color? focusColor,
- Color? hoverColor,
- Color? highlightColor,
- Color? splashColor,
- Brightness? colorBrightness,
- double? elevation,
- double? focusElevation,
- double? hoverElevation,
- double? highlightElevation,
- double? disabledElevation,
- EdgeInsetsGeometry? padding,
- VisualDensity? visualDensity,
- ShapeBorder? shape,
- Clip clipBehavior = Clip.none,
- FocusNode? focusNode,
- bool autofocus = false,
- MaterialTapTargetSize? materialTapTargetSize,
- Duration? animationDuration,
- double? minWidth,
- double? height,
- 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,
});