CupertinoButton.filled constructor

const CupertinoButton.filled({
  1. Key? key,
  2. required Widget child,
  3. CupertinoButtonSize sizeStyle = CupertinoButtonSize.large,
  4. EdgeInsetsGeometry? padding,
  5. Color? color,
  6. Color disabledColor = CupertinoColors.tertiarySystemFill,
  7. @Deprecated('Use minimumSize instead. ' 'This feature was deprecated after v3.28.0-3.0.pre.') double? minSize,
  8. Size? minimumSize,
  9. double? pressedOpacity = 0.4,
  10. BorderRadius? borderRadius,
  11. AlignmentGeometry alignment = Alignment.center,
  12. Color? focusColor,
  13. FocusNode? focusNode,
  14. ValueChanged<bool>? onFocusChange,
  15. bool autofocus = false,
  16. VoidCallback? onLongPress,
  17. required VoidCallback? onPressed,
})

Creates an iOS-style button with a filled background.

The background color is derived from the color argument. The foreground color is the CupertinoTheme's primaryContrastingColor.

Implementation

const CupertinoButton.filled({
  super.key,
  required this.child,
  this.sizeStyle = CupertinoButtonSize.large,
  this.padding,
  this.color,
  this.disabledColor = CupertinoColors.tertiarySystemFill,
  @Deprecated(
    'Use minimumSize instead. '
    'This feature was deprecated after v3.28.0-3.0.pre.',
  )
  this.minSize,
  this.minimumSize,
  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)),
     assert(minimumSize == null || minSize == null),
     _style = _CupertinoButtonStyle.filled;