AsyncFormError<Request, Response> class
Represents the error state of a form.
- Inheritance
-
- Object
- AsyncFormValue<
Request, Response> - AsyncFormError
Constructors
- AsyncFormError.new(Object error, StackTrace stackTrace, {Request? request, Response? response})
-
const
Properties
- error → Object
-
The error that occurred.
final
- hasError → bool
-
Whether the form is in an error state.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasValue → bool
-
Whether the form has data.
no setterinherited
- isIdle → bool
-
Whether the form is in its initial idle state.
no setterinherited
- isLoading → bool
-
Whether the form is currently in a loading state.
no setterinherited
- request → Request?
-
The previous request data, if available.
final
- response → Response?
-
The previous response data, if available.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace
-
The stack trace of the error.
final
Methods
-
map<
R> ({required R idle(AsyncFormIdle< Request, Response> idle), required R data(AsyncFormData<Request, Response> data), required R error(AsyncFormError<Request, Response> error), required R loading(AsyncFormLoading<Request, Response> loading)}) → R -
Pattern-matching over the form state.
inherited
-
maybeMap<
R> ({R idle(AsyncFormIdle< Request, Response> idle)?, R data(AsyncFormData<Request, Response> data)?, R error(AsyncFormError<Request, Response> error)?, R loading(AsyncFormLoading<Request, Response> loading)?, required R orElse}) → R -
Optional pattern-matching over the form state.
inherited
-
maybeWhen<
R> ({R? idle, R? data, R? error, R? loading, required R orElse}) → R -
Optional pattern-matching over the form state with direct values.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
when<
R> ({required R idle, required R data, required R error, required R loading}) → R -
Pattern-matching over the form state with direct values.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override