ShadIconButton.raw constructor

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

Creates an icon button widget with a specified variant, offering full customization.

Implementation

const ShadIconButton.raw({
  super.key,
  required this.variant,
  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,
}) : assert(
       variant != ShadButtonVariant.link,
       "ShadIconButton doesn't support the link variant",
     );