PromptState<T> class

Mutable state container for prompt values.

Provides:

  • value: The current value (mutable)
  • isCancelled: Whether the prompt was cancelled
  • cancel(): Method to mark as cancelled

This is passed to both buildBindings and render functions, allowing bindings to modify state and rendering to read it.

Constructors

PromptState(T value)
Creates a new prompt state with initial value.

Properties

hashCode int
The hash code for this object.
no setterinherited
isCancelled bool
Whether the prompt was cancelled.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T
The current value.
getter/setter pair

Methods

cancel() → void
Marks the prompt as cancelled.
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