InjectedForm class abstract

Inject a Form state.

Used in conjunction with On.form.

Constructors

InjectedForm()

Properties

autoDisposeWhenNotUsed bool
no setterinherited
autovalidateMode AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
getter/setter pair
error → dynamic
The error
no setterinherited
hasData bool
The state is mutated successfully.
no setterinherited
hasError bool
The stats has error
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasObservers bool
Whether the state has observers
no setterinherited
isActive bool
Whether the state is active or not.
no setterinherited
isDone bool
The state is mutated using a stream and the stream is done.
no setterinherited
isIdle bool
The state is initialized and never mutated.
no setterinherited
isValid bool
True if all text fields of the form are valid.
no setter
isWaiting bool
The state is waiting for and asynchronous task to end.
no setterinherited
oldSnapState SnapState<bool?>
no setterinherited
rebuild → _RebuildForm
Listen to the InjectedForm and rebuild when it is notified.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapState SnapState<bool?>
A snap representation of the state
getter/setter pairinherited
state bool?
no setterinherited
stateAsync Future<bool?>
It is a future of the state. The future is active if the state is on the isWaiting status.
no setterinherited
submitFocusNode FocusNode
Creates a focus node to be used with submit button
no setter

Methods

dispose() → void
Dispose the state.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
Notify observers
inherited
onAll<R>({R onIdle()?, required R onWaiting()?, required R onError(dynamic error, VoidCallback refreshError)?, required R onData(bool? data)}) → R
inherited
onOrElse<R>({R onIdle()?, R onWaiting()?, R onError(dynamic error, VoidCallback refreshError)?, R onData(bool? data)?, required R orElse(bool? data)}) → R
inherited
reset() → void
Resets the fields to their initial values.
submit([Future<void> fn()?]) → void
toString() String
A string representation of this object.
inherited
validate() bool
Validate the text fields and return true if they are all valid

Operators

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