CupertinoButton constructor

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

Creates an iOS-style button.

Implementation

const CupertinoButton({
  super.key,
  required this.child,
  this.sizeStyle = CupertinoButtonSize.large,
  this.padding,
  this.color,
  this.disabledColor = CupertinoColors.quaternarySystemFill,
  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)),
     _style = _CupertinoButtonStyle.plain;