TriggerType enum

What starts a reaction.

Inheritance
Available extensions

Values

click → const TriggerType

A tap (a click with a mouse). ${result} holds where it landed (x, y in the node, globalX, globalY) and the modifier keys held (meta, shift, alt).

doubleTap → const TriggerType

Two taps in quick succession. A node with double tap reactions waits out the double tap timeout before its single taps run.

longPress → const TriggerType

A long press.

hold → const TriggerType

A press held for Trigger.holdMs; letting go early cancels it.

secondaryClick → const TriggerType

A right click, or a two-finger tap on a trackpad (${result.x}, ${result.y}: where, on screen).

pointerDown → const TriggerType

A pointer went down on the node.

pointerUp → const TriggerType

A pointer went up (or was canceled) on the node.

hover → const TriggerType

The mouse cursor moved over the node (fires when it enters, too).

cursorEnter → const TriggerType

The mouse cursor entered the node (once).

cursorExit → const TriggerType

The mouse cursor left the node (once).

swipeLeft → const TriggerType

A swipe (a fling) to the left, right, up or down.

swipeRight → const TriggerType
swipeUp → const TriggerType
swipeDown → const TriggerType
drag → const TriggerType

The node is dragged (every move); dragEnd when it's let go.

dragEnd → const TriggerType
wheel → const TriggerType

Wheel or trackpad scroll over the node; a pinch on it.

pinch → const TriggerType
changed → const TriggerType

An input's value changed (typed text, a toggled checkbox, a slider step, a picked item). ${result} is the new value (a text field's: its text, word and selection).

changeEnd → const TriggerType

A slider was let go, with its final value.

submitted → const TriggerType

A text field was submitted from the keyboard.

deleted → const TriggerType

An input chip's delete icon was tapped, or Delete or Backspace pressed on it (Flutter's onDeleted).

editingComplete → const TriggerType

A text field lost focus after editing.

focusGained → const TriggerType

A text field gained or lost focus.

focusLost → const TriggerType
load → const TriggerType

A screen appeared (set on its canvas).

imageLoading → const TriggerType

A node's image fill started loading, became ready, or failed. ${result.url} identifies the image and ${result.status} is loading, loaded, or error. Cached images can report loaded immediately without a loading event.

imageLoaded → const TriggerType
imageError → const TriggerType
backPressed → const TriggerType

On a screen (its canvas): the user tried to leave it (the system or browser back button, a back gesture, Escape on a dialog) while the canvas's blockBack holds (props.blockBack, usually bound: ${= dirty}). The screen stays and these actions run instead, e.g. a "Discard changes?" confirm that leaves with a navigate pop, which the block doesn't stop. While blockBack is false, back leaves as usual and this doesn't fire.

valueChanged → const TriggerType

Variable Trigger.variable changed while the screen shows.

timer → const TriggerType

Every Trigger.intervalMs while the screen shows (Timer.periodic) and Trigger.when holds; ${result.tick} counts.

frame → const TriggerType

Every frame while the node is on stage and Trigger.when holds (a Ticker): ${result.dt} (ms since the tick this chain last got), ${result.elapsed} (ms since it started), ${result.frame}. A frame that comes while the chain still runs is skipped; its time goes to the next dt. A design canvas never ticks.

keyDown → const TriggerType

A key went down (or up) while the screen shows; Trigger.key limits it to one key or combination, Trigger.when to while a formula holds. ${result.key}, ${result.shift}, ${result.alt}, ${result.meta}.

keyUp → const TriggerType
scroll → const TriggerType

The node (a scrolling row, column, list, grid or canvas) scrolled (${result.offset}, ${result.max}, ${result.fraction} 0–1, ${result.index} the item at the start of the view (the last at the end), ${result.count} the items), or came near its end (load the next page). Store what a carousel's arrows, dots or progress bar show.

scrollEnd → const TriggerType

The node stopped scrolling; ${result} as for scroll.

enterViewport → const TriggerType

At least Trigger.visibleFraction of the node became visible (and stayed so for Trigger.visibleMs), or it fell below that after being visible. With Trigger.onceKey (${item.id}), an impression: once per item per app session.

exitViewport → const TriggerType
dragStart → const TriggerType

Drag and drop: on a draggable (start, cancel, completed) and on a drop target (drop, enter, exit, rejected). ${result} and ${drag} hold the drag (what was dragged is ${result.data}). A list with a reorder fires dragStart when a row is picked up and dragCompleted when it is let go (moved or not), with ${result.index} and ${result.item}: a list can change while a row is lifted (fold its rows into tiles). On a node with a drag reaction (and no drag and drop), dragStart is the start of that one-finger drag, where the finger went down (${drag.x}, ${drag.y}): begin a stroke there rather than on pointerDown, which fires for every finger of a pinch.

dragCancel → const TriggerType
dragCompleted → const TriggerType
drop → const TriggerType
dragEnter → const TriggerType
dragExit → const TriggerType
dropRejected → const TriggerType
reorder → const TriggerType

A data list row was dragged to a new place by this node, its reorder handle (${result.from}, ${result.to}). A list with a reorder fires it too, with ${result.item}, ${result.fromList}, ${result.toList}.

refresh → const TriggerType

A list or grid was pulled past its start to refresh (its pullToRefresh, or its pagination's); its pagination reloads its first page too. A list with this reaction can always be pulled.

swipeAction → const TriggerType

A swipe action of a list item ran (the list's swipeActions): ${result.action}, ${result.label}, ${result.item}, ${result.index}.

rowTap → const TriggerType

A table view's body row was tapped: ${result.row} (the row's data), ${result.rowIndex}, ${result.column} (the tapped column's key), ${result.columnIndex}.

actionError → const TriggerType

On the current canvas: a failed action chain or cloud subscription. ${result.error} is {type, message, action, nodeId} (no stack or raw service objects). A failure in this reaction reports to the host without recursively firing another actionError reaction.

event → const TriggerType

On a component call: the component fired its event Trigger.event (a componentEvent action inside its definition); ${result} is the event's payload. Flutter: the callback passed to a widget's onChanged-style parameter. The handler runs in the caller's scope.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

input → const Set<TriggerType>
The triggers an input fires.
pointer → const Set<TriggerType>
The triggers a node's pointer input fires (the render tree wires them on the node's box).
screen → const Set<TriggerType>
The triggers of a screen: they fire while it shows, wherever they're set.
swipes → const List<TriggerType>
The swipe triggers.
values → const List<TriggerType>
A constant List of the values in this enum, in order of their declaration.