CupertinoButton.filled constructor

const CupertinoButton.filled(
  1. {Key? key,
  2. required Widget child,
  3. EdgeInsetsGeometry? padding,
  4. Color disabledColor = CupertinoColors.quaternarySystemFill,
  5. double? minSize = kMinInteractiveDimensionCupertino,
  6. double? pressedOpacity = 0.4,
  7. BorderRadius? borderRadius = const BorderRadius.all(Radius.circular(8.0)),
  8. AlignmentGeometry alignment = Alignment.center,
  9. 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.padding,
  this.disabledColor = CupertinoColors.quaternarySystemFill,
  this.minSize = kMinInteractiveDimensionCupertino,
  this.pressedOpacity = 0.4,
  this.borderRadius = const BorderRadius.all(Radius.circular(8.0)),
  this.alignment = Alignment.center,
  required this.onPressed,
}) : assert(pressedOpacity == null || (pressedOpacity >= 0.0 && pressedOpacity <= 1.0)),
     color = null,
     _filled = true;