CupertinoActionSheet constructor Null safety
- {Key? key,
- Widget? title,
- Widget? message,
- List<
Widget> ? actions, - ScrollController? messageScrollController,
- ScrollController? actionScrollController,
- 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',
);