CupertinoActionSheet class

An iOS-style action sheet.

An action sheet is a specific style of alert that presents the user with a set of two or more choices related to the current context. An action sheet can have a title, an additional message, and a list of actions. The title is displayed above the message and the actions are displayed below this content.

This action sheet styles its title and message to match standard iOS action sheet title and message text style.

To display action buttons that look like standard iOS action sheet buttons, provide CupertinoActionSheetActions for the actions given to this action sheet.

To include a iOS-style cancel button separate from the other buttons, provide an CupertinoActionSheetAction for the cancelButton given to this action sheet.

An action sheet is typically passed as the child widget to showCupertinoModalPopup, which displays the action sheet by sliding it up from the bottom of the screen.

See also:

Inheritance

Constructors

CupertinoActionSheet({Key key, Widget title, Widget message, List<Widget> actions, ScrollController messageScrollController, ScrollController actionScrollController, Widget cancelButton })
Creates an iOS-style action sheet. [...]
const

Properties

actions List<Widget>
The set of actions that are displayed for the user to select. [...]
final
actionScrollController ScrollController
A scroll controller that can be used to control the scrolling of the actions in the action sheet. [...]
final
cancelButton Widget
The optional cancel button that is grouped separately from the other actions. [...]
final
message Widget
An optional descriptive message that provides more details about the reason for the alert. [...]
final
messageScrollController ScrollController
A scroll controller that can be used to control the scrolling of the message in the action sheet. [...]
final
title Widget
An optional title of the action sheet. When the message is non-null, the font of the title is bold. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget. [...]
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String name, DiagnosticsTreeStyle style }) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this object.
inherited
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited