RequestState<T> class
- Annotations
Constructors
- RequestState({RequestStatus? status = RequestStatus.empty, T? model, String? errorMessage})
-
const
- RequestState.empty()
-
const
Properties
- errorMessage → String?
-
This contains the error message caught by
request function
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- model → T?
-
This is the model of type
T
to be preserved by the bloc state.final -
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → RequestStatus?
-
The status of the current state
can be either RequestStatus.empty,
RequestStatus.loading, RequestStatus.success
or RequestStatus.failure
final
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited
Methods
-
copyWith(
{required RequestStatus status, T? model, String? errorMessage}) → RequestState< T> -
This methods helps in persisting the data i.e.
model
that has once entered the bloc state. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String - A string representation of this object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited