CupertinoActionSheet constructor Null safety

const CupertinoActionSheet(
  1. {Key? key,
  2. Widget? title,
  3. Widget? message,
  4. List<Widget>? actions,
  5. ScrollController? messageScrollController,
  6. ScrollController? actionScrollController,
  7. Widget? cancelButton}
)

Creates an iOS-style action sheet.

An action sheet must have a non-null value for at least one of the following arguments: actions, title, message, or cancelButton.

Generally, action sheets are used to give the user a choice between two or more choices for the current context.

Implementation

const CupertinoActionSheet({
  super.key,
  this.title,
  this.message,
  this.actions,
  this.messageScrollController,
  this.actionScrollController,
  this.cancelButton,
}) : assert(
       actions != null || title != null || message != null || cancelButton != null,
       'An action sheet must have a non-null value for at least one of the following arguments: '
       'actions, title, message, or cancelButton',
     );