InjectedFormImp class
Implementation of InjectedForm
- Inheritance
-
- Object
- ReactiveModel<
bool?> - ReactiveModelImp<
bool?> - InjectedFormImp
- Mixed-in types
- Available extensions
Constructors
-
InjectedFormImp({AutovalidateMode autovalidateMode = AutovalidateMode.disabled, bool autoFocusOnFirstError = true, SideEffects? sideEffects, Future<
void> submit()?, bool? isEnabled, bool? isReadOnly})
Properties
- autoDisposeWhenNotUsed → bool
-
finalinherited
- autoFocusedNode ↔ FocusNode?
-
getter/setter pair
- autoFocusOnFirstError → bool
-
After form is validate, get focused on the first non valid TextField, if any.
final
- autovalidateMode ↔ AutovalidateMode
-
Listen to the InjectedForm and rebuild when it is notified.
Used to enable/disable this form field auto validation and update its
error text.
getter/setter pairinherited
- completer ↔ Completer?
-
getter/setter pairinherited
- connectionState → ConnectionState
-
no setterinherited
- creator → Object? Function()
-
finalinherited
- customStatus ↔ Object?
-
Custom status of the state. Set manually to mark the state with a particular
tag to be used in your logic.
getter/setter pairinherited
- 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 listeners or not
no setterinherited
-
initialSnapState
→ SnapState<
bool?> -
no setterinherited
- initialState ↔ bool?
-
getter/setter pairinherited
- isDirty → bool
-
Is the form dirty (At least on of its field has changed and the form not submitted yet)
no setteroverride
- isDone → bool
-
The state is mutated using a stream and the stream is done.
no setterinherited
- isFormEnabled ↔ bool
-
Whether form field are enabled or not.
getter/setter pairoverride
- isFormReadOnly ↔ bool
-
Whether form field are read only or not.
getter/setter pairoverride
- isIdle → bool
-
The state is initialized and never mutated.
no setterinherited
- isInitialized ↔ bool
-
getter/setter pairinherited
- isStateInitialized → bool
-
no setterinherited
- isValid → bool
-
True if all text fields of the form are valid.
no setteroverride
- isWaiting → bool
-
The state is waiting for and asynchronous task to end.
no setterinherited
- isWaitingToInitialize ↔ bool
-
getter/setter pairinherited
- mockableCreator → Object? Function()
-
no setterinherited
- observerLength → int
-
no setterinherited
-
oldSnapState
→ SnapState<
bool?> ? -
no setterinherited
- removeFromReactiveModel ↔ VoidCallback?
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sideEffects → SideEffects?
-
final
-
snapState
→ SnapState<
bool?> -
A snap representation of the state
no setterinherited
-
snapValue
↔ SnapState<
bool?> -
getter/setter pairinherited
- state ↔ bool?
-
The current state
getter/setter pairinherited
-
stateAsync
↔ Future<
bool?> -
The current Async state
getter/setter pairinherited
-
stateInterceptorGlobal
→ StateInterceptor<
bool?> ? -
finalinherited
- submitFocusNode → FocusNode
-
Creates a focus node to be used with submit button
no setterinherited
- subscription ↔ StreamSubscription?
-
It is not null if the state is waiting for a Future or is subscribed to a
Stream
getter/setter pairinherited
Methods
-
addCleaner(
VoidCallback listener) → VoidCallback -
Add a callback to be executed when the state is disposed of.
inherited
-
addObserver(
{required ObserveReactiveModel listener, bool shouldAutoClean = false, bool isSideEffects = true}) → VoidCallback -
Add observer to this state.
inherited
-
addTextFieldToForm(
_BaseFormField field) → VoidCallback -
cleanState(
) → void -
Clean the state
inherited
-
dispose(
) → void -
Dispose the state
override
-
disposeIfNotUsed(
) → void -
Dispose the state if it has no listener
inherited
-
initialize(
) → void -
inherited
-
initializeState(
) → FutureOr< bool?> -
Initialize the state
inherited
-
interceptState(
SnapState< bool?> snap, StateInterceptor<bool?> ? stateInterceptor) → SnapState<bool?> ? -
inherited
-
middleSetCreator(
StateStatus status, Object? result) → void -
inherited
-
middleSetState(
StateStatus status, Object? result, {SideEffects< bool?> ? sideEffects, StateInterceptor<bool?> ? stateInterceptor, bool shouldOverrideDefaultSideEffects(SnapState<bool?> )?}) → dynamic -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
{SnapState< bool?> ? nextSnap, SideEffects<bool?> ? sideEffects, bool shouldOverrideDefaultSideEffects(SnapState<bool?> )?, StateInterceptor<bool?> ? stateInterceptor}) → bool -
Notify observers
inherited
-
onAll<
R> ({R onIdle()?, required R onWaiting()?, required R onError(dynamic error, VoidCallback refreshError)?, required R onData(bool? data)}) → R -
Listen to the injected Model and rebuild when it emits a notification.
inherited
-
onOrElse<
R> ({R onIdle()?, R onWaiting()?, R onError(dynamic error, VoidCallback refreshError)?, R onData(bool? data)?, required R orElse(bool? data)}) → R -
Listen to the injected Model and rebuild when it emits a notification.
inherited
-
onStateInitialized(
) → void -
inherited
-
rebuildState(
) → void -
inherited
-
refresh(
) → Future< bool?> -
Refresh the Injected state. Refreshing the state means reinitialize
it and reinvoke its creation function and notify its listeners.
inherited
-
reset(
) → void -
Resets the fields to their initial values.
override
-
resetDefaultState(
) → void -
inherited
-
setState(
Object? mutator(bool? s), {SideEffects< bool?> ? sideEffects, StateInterceptor<bool?> ? stateInterceptor, bool shouldOverrideDefaultSideEffects(SnapState<bool?> snap)?, int debounceDelay = 0, int throttleDelay = 0}) → Future<bool?> -
Mutate the state of the model and notify observers.
inherited
-
setStateNullable(
Object? mutator(bool? s), {required void middleSetState(StateStatus, dynamic result), required StackTrace? stackTrace}) → FutureOr< bool?> -
inherited
-
setToHasData(
dynamic data, {SideEffects< bool?> ? sideEffects, bool shouldOverrideDefaultSideEffects(SnapState<bool?> )?, StateInterceptor<bool?> ? stateInterceptor}) → void -
Set the state to the data status
inherited
-
setToHasError(
dynamic error, {StackTrace? stackTrace, VoidCallback? refresher, SideEffects< bool?> ? sideEffects, bool shouldOverrideDefaultSideEffects(SnapState<bool?> )?, StateInterceptor<bool?> ? stateInterceptor}) → void -
Set the state to the error status
inherited
-
setToIsIdle(
[Object? data]) → void -
Set the state to the idle status
inherited
-
setToIsWaiting(
{SideEffects< bool?> ? sideEffects, bool shouldOverrideDefaultSideEffects(SnapState<bool?> )?, StateInterceptor<bool?> ? stateInterceptor}) → void -
Set the state to the waiting status
inherited
-
submit(
[Future< void> fn()?]) → void -
Submit the form.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
[bool isFromSubmission = false]) → bool -
Validate the text fields and return true if they are all valid
override
-
whenConnectionState<
R> ({R onIdle()?, required R onWaiting()?, required R onError(dynamic error)?, required R onData(bool? data)}) → R -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited