UiState<T, F> class
- Available extensions
- Annotations
-
- @freezed
Constructors
- UiState.error(F failure)
-
constfactory
- UiState.idle()
-
constfactory
- UiState.loading()
-
constfactory
- UiState.success(T data)
-
constfactory
Properties
Methods
-
map<
TResult extends Object?> ({required TResult idle(Idle< T, F> value), required TResult loading(Loading<T, F> value), required TResult error(Error<T, F> value), required TResult success(Success<T, F> value)}) → TResult -
Available on UiState<
AT, F> , provided by the UiStatePatterns extensionswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? idle(Idle< T, F> value)?, TResult? loading(Loading<T, F> value)?, TResult? error(Error<T, F> value)?, TResult? success(Success<T, F> value)?}) → TResult? -
Available on UiState<
A variant ofT, F> , provided by the UiStatePatterns extensionmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> ({TResult idle(Idle< T, F> value)?, TResult loading(Loading<T, F> value)?, TResult error(Error<T, F> value)?, TResult success(Success<T, F> value)?, required TResult orElse()}) → TResult -
Available on UiState<
A variant ofT, F> , provided by the UiStatePatterns extensionmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> ({TResult idle()?, TResult loading()?, TResult error(F failure)?, TResult success(T data)?, required TResult orElse()}) → TResult -
Available on UiState<
A variant ofT, F> , provided by the UiStatePatterns extensionwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult idle(), required TResult loading(), required TResult error(F failure), required TResult success(T data)}) → TResult -
Available on UiState<
AT, F> , provided by the UiStatePatterns extensionswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? idle()?, TResult? loading()?, TResult? error(F failure)?, TResult? success(T data)?}) → TResult? -
Available on UiState<
A variant ofT, F> , provided by the UiStatePatterns extensionwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited