IdleState<T, E> class final

Idle state - no request made yet

Inheritance
Available extensions

Constructors

IdleState()
const

Properties

data → T?
Get data if in success state, null otherwise
no setterinherited
dataOrNull → T?

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Get data or null
no setter
error FailureResponse<E>?
Get error if in failed/networkError state, null otherwise
no setterinherited
errorOrNull FailureResponse<E>?

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Get error or null
no setter
hasData bool

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Check if has data
no setter
hasError bool

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Check if has error
no setter
hashCode int
The hash code for this object.
no setteroverride
isError bool

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Check if is any error state (failed or network error)
no setter
isFailed bool

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Check if is failed
no setter
isIdle bool

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Check if is idle
no setter
isLoading bool

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Check if is loading
no setter
isNetworkError bool

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Check if is network error
no setter
isSuccess bool

Available on ApiState<T, E>, provided by the ApiStateConvenience extension

Check if is success
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<R>(R transform(T data)) ApiState<R, E>
Map the success data to a new type
inherited
maybeWhen<R>({R idle()?, R loading()?, R success(T data)?, R failed(FailureResponse<E> error)?, R networkError(FailureResponse<E> error)?, required R orElse()}) → R
Pattern matching with optional handlers
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 loading(), required R success(T data), required R failed(FailureResponse<E> error), required R networkError(FailureResponse<E> error)}) → R
Pattern matching for all states
inherited

Operators

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