SimpleObjectInput<T, E extends FormError> class final

Inheritance
Mixed-in types

Constructors

SimpleObjectInput.touched({required T value, T? initialValue, ValidationMode mode = ValidationMode.live, E? errorCache, E? remoteError, List<Validator<T, E>> validators = const []})
const
SimpleObjectInput.untouched({required T value, ValidationMode mode = ValidationMode.live, E? errorCache, List<Validator<T, E>> validators = const []})
const

Properties

asyncValidators List<AsyncValidator<T, E>>
Asynchronous validators run via InputMixin.runBuiltInAsyncValidation.
no setterinherited
currentRemoteError → E?
no setterinherited
detailedErrors List<E>
ALL validation errors for the current value — bypasses the cache. Use for password-strength meters or multi-requirement checklists.
no setterinherited
error → E?
Remote errors take precedence over local ones.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
initialValue → T
finalinherited
isDirty bool
True when the current value differs from initialValue.
no setterinherited
isNotValid bool
no setterinherited
isPristine bool
True when the current value equals the initialValue (user has not changed the field from its starting state).
no setterinherited
isTouched bool
no setterinherited
isUntouched bool
no setterinherited
isValid bool
no setterinherited
isValidating bool
no setterinherited
localError → E?
no setterinherited
mode ValidationMode
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sanitizers List<Sanitizer<T>>
no setterinherited
status InputStatus
finalinherited
validators List<Validator<T, E>>
Synchronous validators run against value.
no setteroverride
value → T
finalinherited

Methods

clearRemoteError() SimpleObjectInput<T, E>
Clears any existing remote error.
inherited
displayError(SubmissionStatus status) → E?
Resolves the error to show in the UI based on SubmissionStatus and ValidationMode.
inherited
markTouched() SimpleObjectInput<T, E>
Marks the field as InputStatus.touched without changing the value.
inherited
markUntouched() SimpleObjectInput<T, E>
Marks the field as InputStatus.untouched without changing the value.
inherited
markValidating() SimpleObjectInput<T, E>
Sets the status to InputStatus.validating.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareUpdate({T? value, InputStatus? status, ValidationMode? mode, E? remoteError}) InputData<T, E>
⚠️ Known limitation: when T is nullable (e.g., DateTime?), passing value: null is indistinguishable from omitting value. Use InputMixin.reset to revert a nullable field to its initial value.
inherited
replaceValue(T value) SimpleObjectInput<T, E>
Updates the value, runs validation, and marks the input as InputStatus.touched.
inherited
reset() SimpleObjectInput<T, E>
Reverts the input to its FormInput.initialValue and InputStatus.untouched.
inherited
resolveAsyncValidation(E? error) SimpleObjectInput<T, E>
Resolves the result of an async validation operation.
inherited
runAsync({required Future<E?> task(), required void onValidating(SimpleObjectInput<T, E> validating)}) Future<SimpleObjectInput<T, E>>
Runs an async validation task through the standard lifecycle: markValidatingawait taskresolveAsyncValidation.
inherited
runBuiltInAsyncValidation({required void onValidating(SimpleObjectInput<T, E> validating)}) Future<SimpleObjectInput<T, E>>
Convenience wrapper for runAsync that uses the declared asyncValidators.
inherited
sanitize(T value) → T
inherited
setMode(ValidationMode mode) SimpleObjectInput<T, E>
Changes the ValidationMode dynamically.
inherited
setRemoteError(E error) SimpleObjectInput<T, E>
Injects an external error (e.g., "Email already taken" from an API response).
inherited
setValue(T value) SimpleObjectInput<T, E>
Updates the value but preserves the current InputStatus.
inherited
toString() String
A string representation of this object.
inherited
update({T? value, InputStatus? status, ValidationMode? mode, E? remoteError}) SimpleObjectInput<T, E>
override
validate(T value) → E?
inherited
validateAsync(T value) Future<E?>
inherited

Operators

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