ShadButton.raw constructor

const ShadButton.raw({
  1. Key? key,
  2. required ShadButtonVariant variant,
  3. ShadButtonSize? size,
  4. Widget? child,
  5. Widget? leading,
  6. Widget? trailing,
  7. VoidCallback? onPressed,
  8. MouseCursor? cursor,
  9. double? width,
  10. double? height,
  11. EdgeInsetsGeometry? padding,
  12. Color? backgroundColor,
  13. Color? hoverBackgroundColor,
  14. Color? foregroundColor,
  15. Color? hoverForegroundColor,
  16. bool autofocus = false,
  17. FocusNode? focusNode,
  18. Color? pressedBackgroundColor,
  19. Color? pressedForegroundColor,
  20. List<BoxShadow>? shadows,
  21. Gradient? gradient,
  22. TextDecoration? textDecoration,
  23. TextDecoration? hoverTextDecoration,
  24. ShadDecoration? decoration,
  25. bool enabled = true,
  26. VoidCallback? onLongPress,
  27. ShadStatesController? statesController,
  28. MainAxisAlignment? mainAxisAlignment,
  29. CrossAxisAlignment? crossAxisAlignment,
  30. ShadHoverStrategies? hoverStrategies,
  31. ValueChanged<bool>? onHoverChange,
  32. ValueChanged<TapDownDetails>? onTapDown,
  33. ValueChanged<TapUpDetails>? onTapUp,
  34. VoidCallback? onTapCancel,
  35. ValueChanged<TapDownDetails>? onSecondaryTapDown,
  36. ValueChanged<TapUpDetails>? onSecondaryTapUp,
  37. VoidCallback? onSecondaryTapCancel,
  38. ValueChanged<LongPressStartDetails>? onLongPressStart,
  39. VoidCallback? onLongPressCancel,
  40. VoidCallback? onLongPressUp,
  41. ValueChanged<LongPressDownDetails>? onLongPressDown,
  42. ValueChanged<LongPressEndDetails>? onLongPressEnd,
  43. VoidCallback? onDoubleTap,
  44. ValueChanged<TapDownDetails>? onDoubleTapDown,
  45. VoidCallback? onDoubleTapCancel,
  46. Duration? longPressDuration,
  47. TextDirection? textDirection,
  48. double? gap,
  49. ValueChanged<bool>? onFocusChange,
  50. bool? expands,
  51. TextStyle? textStyle,
  52. bool? canRequestFocus,
})

Creates a button widget with a specified variant, allowing full control over configuration.

Implementation

const ShadButton.raw({
  super.key,
  required this.variant,
  this.size,
  this.child,
  this.leading,
  this.trailing,
  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.textDecoration,
  this.hoverTextDecoration,
  this.decoration,
  this.enabled = true,
  this.onLongPress,
  this.statesController,
  this.mainAxisAlignment,
  this.crossAxisAlignment,
  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.textDirection,
  this.gap,
  this.onFocusChange,
  this.expands,
  this.textStyle,
  this.canRequestFocus,
});