CupertinoButton constructor

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

Creates an iOS-style button.

Implementation

const CupertinoButton({
  super.key,
  required this.child,
  this.padding,
  this.color,
  this.disabledColor = CupertinoColors.quaternarySystemFill,
  this.minSize = kMinInteractiveDimensionCupertino,
  this.pressedOpacity = 0.4,
  this.borderRadius = const BorderRadius.all(Radius.circular(8.0)),
  this.alignment = Alignment.center,
  this.focusColor,
  this.focusNode,
  this.onFocusChange,
  this.autofocus = false,
  required this.onPressed,
}) : assert(pressedOpacity == null || (pressedOpacity >= 0.0 && pressedOpacity <= 1.0)),
     _filled = false;