SubInitial<TSuccess, TError> class final

The idle variant of SubState.

Inheritance

Constructors

SubInitial()
const

Properties

dataOrNull → TSuccess?
The success value, or null when not in the success state.
no setterinherited
errorOrNull → TError?
The error value, or null when not in the failure state.
no setterinherited
hashCode int
The hash code for this object.
no setteroverride
isFailure bool
Whether this is SubState.failure.
no setterinherited
isInitial bool
Whether this is SubState.initial.
no setterinherited
isLoading bool
Whether this is SubState.loading.
no setterinherited
isSuccess bool
Whether this is SubState.success.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<R>({required R initial(SubInitial<TSuccess, TError> value), required R loading(SubLoading<TSuccess, TError> value), required R success(SubSuccess<TSuccess, TError> value), required R failure(SubFailure<TSuccess, TError> value)}) → R
Exhaustively map every state to a value of type R, receiving the raw state object (handy for accessing SubSuccess.copyWith).
inherited
mapOrNull<R>({R? initial(SubInitial<TSuccess, TError> value)?, R? loading(SubLoading<TSuccess, TError> value)?, R? success(SubSuccess<TSuccess, TError> value)?, R? failure(SubFailure<TSuccess, TError> value)?}) → R?
Like map, but unhandled states return null.
inherited
maybeMap<R>({R initial(SubInitial<TSuccess, TError> value)?, R loading(SubLoading<TSuccess, TError> value)?, R success(SubSuccess<TSuccess, TError> value)?, R failure(SubFailure<TSuccess, TError> value)?, required R orElse()}) → R
Like map, but unhandled states fall back to orElse.
inherited
maybeWhen<R>({R initial()?, R loading()?, R success(TSuccess data)?, R failure(TError error)?, required R orElse()}) → R
Like when, but unhandled states fall back to orElse.
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 initial(), required R loading(), required R success(TSuccess data), required R failure(TError error)}) → R
Exhaustively map every state to a value of type R.
inherited
whenOrNull<R>({R? initial()?, R? loading()?, R? success(TSuccess data)?, R? failure(TError error)?}) → R?
Like when, but unhandled states return null.
inherited

Operators

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