ShadIconButton.destructive constructor
const
ShadIconButton.destructive({
- Key? key,
- required Widget icon,
- double? iconSize,
- VoidCallback? onPressed,
- MouseCursor? cursor,
- double? width,
- double? height,
- EdgeInsetsGeometry? padding,
- Color? backgroundColor,
- Color? hoverBackgroundColor,
- Color? foregroundColor,
- Color? hoverForegroundColor,
- bool autofocus = false,
- FocusNode? focusNode,
- ValueChanged<
bool> ? onFocusChange, - Color? pressedBackgroundColor,
- Color? pressedForegroundColor,
- List<
BoxShadow> ? shadows, - Gradient? gradient,
- ShadDecoration? decoration,
- bool enabled = true,
- VoidCallback? onLongPress,
- ShadStatesController? statesController,
- ShadHoverStrategies? hoverStrategies,
- ValueChanged<
bool> ? onHoverChange, - ValueChanged<
TapDownDetails> ? onTapDown, - ValueChanged<
TapUpDetails> ? onTapUp, - VoidCallback? onTapCancel,
- ValueChanged<
TapDownDetails> ? onSecondaryTapDown, - ValueChanged<
TapUpDetails> ? onSecondaryTapUp, - VoidCallback? onSecondaryTapCancel,
- ValueChanged<
LongPressStartDetails> ? onLongPressStart, - VoidCallback? onLongPressCancel,
- VoidCallback? onLongPressUp,
- ValueChanged<
LongPressDownDetails> ? onLongPressDown, - ValueChanged<
LongPressEndDetails> ? onLongPressEnd, - VoidCallback? onDoubleTap,
- ValueChanged<
TapDownDetails> ? onDoubleTapDown, - VoidCallback? onDoubleTapCancel,
- Duration? longPressDuration,
Creates a destructive variant icon button widget, typically for warning or error actions.
Implementation
const ShadIconButton.destructive({
super.key,
required this.icon,
this.iconSize,
this.onPressed,
this.cursor,
this.width,
this.height,
this.padding,
this.backgroundColor,
this.hoverBackgroundColor,
this.foregroundColor,
this.hoverForegroundColor,
this.autofocus = false,
this.focusNode,
this.onFocusChange,
this.pressedBackgroundColor,
this.pressedForegroundColor,
this.shadows,
this.gradient,
this.decoration,
this.enabled = true,
this.onLongPress,
this.statesController,
this.hoverStrategies,
this.onHoverChange,
this.onTapDown,
this.onTapUp,
this.onTapCancel,
this.onSecondaryTapDown,
this.onSecondaryTapUp,
this.onSecondaryTapCancel,
this.onLongPressStart,
this.onLongPressCancel,
this.onLongPressUp,
this.onLongPressDown,
this.onLongPressEnd,
this.onDoubleTap,
this.onDoubleTapDown,
this.onDoubleTapCancel,
this.longPressDuration,
}) : variant = ShadButtonVariant.destructive;