CupertinoButton constructor
- Key? key,
- required Widget child,
- EdgeInsetsGeometry? padding,
- Color? color,
- Color disabledColor = CupertinoColors.quaternarySystemFill,
- double? minSize = kMinInteractiveDimensionCupertino,
- double? pressedOpacity = 0.4,
- BorderRadius? borderRadius = const BorderRadius.all(Radius.circular(8.0)),
- AlignmentGeometry alignment = Alignment.center,
- Color? focusColor,
- FocusNode? focusNode,
- ValueChanged<
bool> ? onFocusChange, - bool autofocus = false,
- required VoidCallback? onPressed,
Creates an iOS-style button.
Implementation
const CupertinoButton({
super.key,
required this.child,
this.padding,
this.color,
this.disabledColor = CupertinoColors.quaternarySystemFill,
this.minSize = kMinInteractiveDimensionCupertino,
this.pressedOpacity = 0.4,
this.borderRadius = const BorderRadius.all(Radius.circular(8.0)),
this.alignment = Alignment.center,
this.focusColor,
this.focusNode,
this.onFocusChange,
this.autofocus = false,
required this.onPressed,
}) : assert(pressedOpacity == null || (pressedOpacity >= 0.0 && pressedOpacity <= 1.0)),
_filled = false;