CupertinoButton.filled constructor

const CupertinoButton.filled({
  1. Key? key,
  2. required Widget child,
  3. CupertinoButtonSize sizeStyle = CupertinoButtonSize.large,
  4. EdgeInsetsGeometry? padding,
  5. Color disabledColor = CupertinoColors.tertiarySystemFill,
  6. double? minSize,
  7. double? pressedOpacity = 0.4,
  8. BorderRadius? borderRadius,
  9. AlignmentGeometry alignment = Alignment.center,
  10. Color? focusColor,
  11. FocusNode? focusNode,
  12. ValueChanged<bool>? onFocusChange,
  13. bool autofocus = false,
  14. VoidCallback? onLongPress,
  15. 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;