ShadIconButton constructor

const ShadIconButton({
  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. Color? pressedBackgroundColor,
  16. Color? pressedForegroundColor,
  17. List<BoxShadow>? shadows,
  18. Gradient? gradient,
  19. ShadDecoration? decoration,
  20. bool enabled = true,
  21. VoidCallback? onLongPress,
  22. ShadStatesController? statesController,
  23. ShadHoverStrategies? hoverStrategies,
  24. ValueChanged<bool>? onHoverChange,
  25. ValueChanged<TapDownDetails>? onTapDown,
  26. ValueChanged<TapUpDetails>? onTapUp,
  27. VoidCallback? onTapCancel,
  28. ValueChanged<TapDownDetails>? onSecondaryTapDown,
  29. ValueChanged<TapUpDetails>? onSecondaryTapUp,
  30. VoidCallback? onSecondaryTapCancel,
  31. ValueChanged<LongPressStartDetails>? onLongPressStart,
  32. VoidCallback? onLongPressCancel,
  33. VoidCallback? onLongPressUp,
  34. ValueChanged<LongPressDownDetails>? onLongPressDown,
  35. ValueChanged<LongPressEndDetails>? onLongPressEnd,
  36. VoidCallback? onDoubleTap,
  37. ValueChanged<TapDownDetails>? onDoubleTapDown,
  38. VoidCallback? onDoubleTapCancel,
  39. Duration? longPressDuration,
  40. ValueChanged<bool>? onFocusChange,
})

Creates a primary variant icon button widget.

Implementation

const ShadIconButton({
  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.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,
  this.onFocusChange,
}) : variant = ShadButtonVariant.primary;