WrapperButton constructor

const WrapperButton({
  1. Key? key,
  2. required VoidCallback onPressed,
  3. VoidCallback? onLongPress,
  4. ValueChanged<bool>? onHover,
  5. ValueChanged<bool>? onFocusChange,
  6. ButtonStyle? style,
  7. Clip clipBehavior = Clip.none,
  8. FocusNode? focusNode,
  9. bool autofocus = false,
  10. WidgetStatesController? statesController,
  11. bool? isSemanticButton,
  12. Widget? child,
  13. String? text,
  14. TextStyle? textStyle,
  15. Color textColor = Colors.black,
  16. double textSize = 14,
  17. FontWeight? textWeight = FontWeight.normal,
  18. TextAlign? textAlign,
  19. bool textExpand = false,
  20. TextOverflow? overflow,
  21. int? maxLines,
  22. Color? backgroundColor,
  23. Color? foregroundColor,
  24. Color? overlayColor = Colors.transparent,
  25. Color? shadowColor,
  26. Color? surfaceTintColor,
  27. AlignmentGeometry? alignment,
  28. EdgeInsetsGeometry padding = EdgeInsets.zero,
  29. OutlinedBorder? shape,
  30. double radius = 0,
  31. BorderRadius? borderRadius,
  32. BorderSide? borderSide,
  33. Color? borderColor = Colors.transparent,
  34. double? borderWidth,
  35. BorderStyle? borderStyle,
  36. double? elevation,
  37. IconPosition? iconPosition = IconPosition.left,
  38. Widget? icon,
  39. Color? iconColor,
  40. double iconSize = 20,
  41. double gap = 4,
  42. double? width,
  43. double? height,
  44. Size? minimumSize,
})

Implementation

const WrapperButton({
  super.key,
  required this.onPressed,
  this.onLongPress,
  this.onHover,
  this.onFocusChange,
  this.style,
  this.clipBehavior = Clip.none,
  this.focusNode,
  this.autofocus = false,
  this.statesController,
  this.isSemanticButton,
  this.child,
  this.text,
  this.textStyle,
  this.textColor = Colors.black,
  this.textSize = 14,
  this.textWeight = FontWeight.normal,
  this.textAlign,
  this.textExpand = false,
  this.overflow,
  this.maxLines,
  this.backgroundColor,
  this.foregroundColor,
  this.overlayColor = Colors.transparent,
  this.shadowColor,
  this.surfaceTintColor,
  this.alignment,
  this.padding = EdgeInsets.zero,
  this.shape,
  this.radius = 0,
  this.borderRadius,
  this.borderSide,
  this.borderColor = Colors.transparent,
  this.borderWidth,
  this.borderStyle,
  this.elevation,
  this.iconPosition = IconPosition.left,
  this.icon,
  this.iconColor,
  this.iconSize = 20,
  this.gap = 4,
  this.width,
  this.height,
  this.minimumSize,
}) : assert(child != null || text != null);