PushButton constructor

const PushButton({
  1. Key? key,
  2. required Widget child,
  3. required ButtonSize buttonSize,
  4. EdgeInsetsGeometry? padding,
  5. Color? color,
  6. Color? disabledColor,
  7. VoidCallback? onPressed,
  8. double? pressedOpacity = 0.4,
  9. BorderRadiusGeometry? borderRadius = const BorderRadius.all(Radius.circular(4.0)),
  10. AlignmentGeometry alignment = Alignment.center,
  11. String? semanticLabel,
  12. MouseCursor? mouseCursor = SystemMouseCursors.basic,
  13. bool? isSecondary,
})

A macOS-style button.

Implementation

const PushButton({
  super.key,
  required this.child,
  required this.buttonSize,
  this.padding,
  this.color,
  this.disabledColor,
  this.onPressed,
  this.pressedOpacity = 0.4,
  this.borderRadius = const BorderRadius.all(Radius.circular(4.0)),
  this.alignment = Alignment.center,
  this.semanticLabel,
  this.mouseCursor = SystemMouseCursors.basic,
  this.isSecondary,
}) : assert(pressedOpacity == null ||
          (pressedOpacity >= 0.0 && pressedOpacity <= 1.0));