CupertinoButton.filled constructor
- Key? key,
- required Widget child,
- CupertinoButtonSize sizeStyle = CupertinoButtonSize.large,
- EdgeInsetsGeometry? padding,
- Color disabledColor = CupertinoColors.tertiarySystemFill,
- double? minSize,
- double? pressedOpacity = 0.4,
- BorderRadius? borderRadius,
- AlignmentGeometry alignment = Alignment.center,
- Color? focusColor,
- FocusNode? focusNode,
- ValueChanged<
bool> ? onFocusChange, - bool autofocus = false,
- VoidCallback? onLongPress,
- required VoidCallback? onPressed,
Creates an iOS-style button with a filled background.
The background color is derived from the CupertinoTheme's primaryColor
.
To specify a custom background color, use the color argument of the default constructor.
Implementation
const CupertinoButton.filled({
super.key,
required this.child,
this.sizeStyle = CupertinoButtonSize.large,
this.padding,
this.disabledColor = CupertinoColors.tertiarySystemFill,
this.minSize,
this.pressedOpacity = 0.4,
this.borderRadius,
this.alignment = Alignment.center,
this.focusColor,
this.focusNode,
this.onFocusChange,
this.autofocus = false,
this.onLongPress,
required this.onPressed,
}) : assert(pressedOpacity == null || (pressedOpacity >= 0.0 && pressedOpacity <= 1.0)),
color = null,
_style = _CupertinoButtonStyle.filled;