CupertinoActionSheetAction constructor Null safety

const CupertinoActionSheetAction(
  1. {Key? key,
  2. required VoidCallback onPressed,
  3. bool isDefaultAction = false,
  4. bool isDestructiveAction = false,
  5. required Widget child}
)

Creates an action for an iOS-style action sheet.

The child and onPressed arguments must not be null.

Implementation

const CupertinoActionSheetAction({
  super.key,
  required this.onPressed,
  this.isDefaultAction = false,
  this.isDestructiveAction = false,
  required this.child,
}) : assert(child != null),
     assert(onPressed != null);