MButton constructor

const MButton({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. VoidCallback? onLongPress,
  4. ValueChanged<bool>? onHover,
  5. ValueChanged<bool>? onFocusChange,
  6. ButtonStyle? style,
  7. FocusNode? focusNode,
  8. bool autofocus = false,
  9. Clip? clipBehavior = Clip.none,
  10. MaterialStatesController? statesController,
  11. bool? isSemanticButton = true,
  12. required Widget child,
  13. Color? backgroundColor,
  14. BorderRadius? borderRadius,
  15. bool clearPadding = false,
  16. Color? disabledColor,
  17. double? elevation,
  18. Size? fixedSize,
  19. Color? foregroundColor,
  20. Size? maximumSize,
  21. Size? minimumSize,
  22. bool noHighlight = false,
  23. bool noSplash = false,
  24. Color? overlayColor,
  25. EdgeInsetsGeometry? padding,
  26. double? radius,
  27. Color? shadowColor,
  28. OutlinedBorder? shape,
  29. BorderSide? side,
  30. InteractiveInkFeatureFactory? splashFactory,
  31. MaterialTapTargetSize? tapTargetSize,
  32. TextStyle? textStyle,
  33. double? width,
  34. double? height,
  35. double? size,
})

Implementation

const MButton({
  super.key,
  super.onPressed,
  super.onLongPress,
  super.onHover,
  super.onFocusChange,
  super.style,
  super.focusNode,
  super.autofocus = false,
  super.clipBehavior = Clip.none,
  super.statesController,
  super.isSemanticButton,
  required Widget super.child,
  this.backgroundColor,
  this.borderRadius,
  this.clearPadding = false,
  this.disabledColor,
  this.elevation,
  this.fixedSize,
  this.foregroundColor,
  this.maximumSize,
  this.minimumSize,
  this.noHighlight = false,
  this.noSplash = false,
  this.overlayColor,
  this.padding,
  this.radius,
  this.shadowColor,
  this.shape,
  this.side,
  this.splashFactory,
  this.tapTargetSize,
  this.textStyle,
  double? width,
  double? height,
  double? size,
})  : width = width ?? size,
      height = height ?? size,
      isSelected = null;