ShadIconButton.destructive constructor

const ShadIconButton.destructive({
  1. Key? key,
  2. required Widget icon,
  3. double? iconSize,
  4. VoidCallback? onPressed,
  5. MouseCursor? cursor,
  6. double? width,
  7. double? height,
  8. EdgeInsetsGeometry? padding,
  9. Color? backgroundColor,
  10. Color? hoverBackgroundColor,
  11. Color? foregroundColor,
  12. Color? hoverForegroundColor,
  13. bool autofocus = false,
  14. FocusNode? focusNode,
  15. ValueChanged<bool>? onFocusChange,
  16. Color? pressedBackgroundColor,
  17. Color? pressedForegroundColor,
  18. List<BoxShadow>? shadows,
  19. Gradient? gradient,
  20. ShadDecoration? decoration,
  21. bool enabled = true,
  22. VoidCallback? onLongPress,
  23. ShadStatesController? statesController,
  24. ShadHoverStrategies? hoverStrategies,
  25. ValueChanged<bool>? onHoverChange,
  26. ValueChanged<TapDownDetails>? onTapDown,
  27. ValueChanged<TapUpDetails>? onTapUp,
  28. VoidCallback? onTapCancel,
  29. ValueChanged<TapDownDetails>? onSecondaryTapDown,
  30. ValueChanged<TapUpDetails>? onSecondaryTapUp,
  31. VoidCallback? onSecondaryTapCancel,
  32. ValueChanged<LongPressStartDetails>? onLongPressStart,
  33. VoidCallback? onLongPressCancel,
  34. VoidCallback? onLongPressUp,
  35. ValueChanged<LongPressDownDetails>? onLongPressDown,
  36. ValueChanged<LongPressEndDetails>? onLongPressEnd,
  37. VoidCallback? onDoubleTap,
  38. ValueChanged<TapDownDetails>? onDoubleTapDown,
  39. VoidCallback? onDoubleTapCancel,
  40. 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;