PushButton constructor
const
PushButton({
- Key? key,
- required Widget child,
- required ButtonSize buttonSize,
- EdgeInsetsGeometry? padding,
- Color? color,
- Color? disabledColor,
- VoidCallback? onPressed,
- double? pressedOpacity = 0.4,
- BorderRadiusGeometry? borderRadius = const BorderRadius.all(Radius.circular(4.0)),
- AlignmentGeometry alignment = Alignment.center,
- String? semanticLabel,
- MouseCursor? mouseCursor = SystemMouseCursors.basic,
- 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));