MinimalActionSheet class
A short list of things to do with one object — a photo's Share, Save and Delete; a message's Reply and Copy — raised from the bottom on a phone: ONE card in the sheet's material holding an optional title and message, a row for each action (a glyph and the words, the destructive one in the destructive ink) and, last, under a hairline like every row, Cancel, centred in the muted ink: the quiet way out, not a second card.
Each row is a cell of the card: its press wash and focus ring take the
card's corners where it meets them and are square between rows. Raise it
with showMinimalActionSheet, which closes the sheet before an action
runs. On a wide window an anchored MinimalMenu is the better answer.
showMinimalActionSheet(context, title: 'Photo', actions: [MinimalActionSheetAction('Share', onPressed: share), MinimalActionSheetAction('Delete', destructive: true, onPressed: delete)])
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MinimalActionSheet
Constructors
-
MinimalActionSheet({Key? key, required List<
MinimalActionSheetAction> actions, String? title, String? message, VoidCallback? onCancel}) -
A sheet of
actions.const
Properties
-
actions
→ List<
MinimalActionSheetAction> -
The actions, top to bottom.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- message → String?
-
A line under the title.
final
- onCancel → VoidCallback?
-
The Cancel row's action; null shows no Cancel.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String?
-
What the actions act on.
final
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.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → 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 ==(
Object other) → bool -
The equality operator.
inherited