NavigatorActionUi class

An ActionUi on the nearest Navigator of context: navigation pushes routes, modals show modal screens as Material dialogs and sheets, toasts are snack bars, confirms an AlertDialog (or the screen they name).

context gives the context the actions run near (a NodeView's, a screen's); it's read when an action runs, so it can be any later one.

Implemented types

Constructors

Properties

breakpoints → Breakpoints? Function()?
The project's breakpoints (per-breakpoint toast looks); null: the defaults.
final
context → BuildContext? Function()
final
files → Future<List<PickedFile>> Function({bool images, bool multiple})?
Picks files for uploads; none by default.
final
hashCode → int
The hash code for this object.
no setterinherited
final
picksFiles → bool
Whether it picks files itself.
no setteroverride
popoverOnTop → bool
no setteroverride
route → ScreenRouteBuilder?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sheetModal → ScreenBuilder?
A modal screen shown as a bottom sheet: as wide as the sheet (a dialog keeps its design width). Null: modal.
final

Methods

closeModal(Object? result) → bool
Closes the modal the action runs in with result; false when it doesn't run in one.
override
confirm(ConfirmAction action, {required String title, String message = '', String caption = '', String confirmLabel = 'OK', String cancelLabel = 'Cancel', Map<String, Object?> bound = const {}, Json params = const {}}) → Future<ConfirmOutcome>
Asks to confirm; text, params and bound (the action's variables) evaluated.
override
hoverAnchorExit(Rect anchor) → void
override
Moves between screens as action says (NavigateAction.mode), with its params and base params evaluated.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openModal(OpenModalAction action, {Json params = const {}}) → Future<Object?>
Shows screen OpenModalAction.to as a modal; completes with what closed it (a CloseModalAction's result), null when dismissed.
override
openSheet(OpenModalAction action, {Json params = const {}, required SheetStop stop}) → Future<Object?>
As ActionUi.openModal, the sheet reading and writing stop.
override
pickFiles({bool images = true, bool multiple = true}) → Future<List<PickedFile>>
Lets the user pick files for an upload (none: canceled).
override
showToast(ShowToastAction action, {required String message, String title = '', String actionLabel = '', Map<String, Object?> bound = const {}, VoidCallback? onAction}) → void
Shows a toast. onAction runs when its button (actionLabel) is pressed. Text and bound (the action's variables and the look's offset, evaluated) are read where the action ran.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited