GenericState<T> class

Annotations
  • @freezed

Constructors

GenericState.errorState({@Default.new(false) bool isRefresh, required String exception})
const
factory
GenericState.fullLoadedState({@Default.new(false) bool isRefresh, required List<T> data})
const
factory
GenericState.loadedState({@Default.new(false) bool isRefresh, required List<T> data})
const
factory
GenericState.loadingState({@Default.new(false) bool isRefresh})
const
factory

Properties

copyWith → $GenericStateCopyWith<T, GenericState<T>>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isRefresh bool
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult loadingState(_LoadingState<T> value), required TResult loadedState(_LoadedState<T> value), required TResult fullLoadedState(_FullLoadedState<T> value), required TResult errorState(_ErrorState<T> value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? loadingState(_LoadingState<T> value)?, TResult? loadedState(_LoadedState<T> value)?, TResult? fullLoadedState(_FullLoadedState<T> value)?, TResult? errorState(_ErrorState<T> value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult loadingState(_LoadingState<T> value)?, TResult loadedState(_LoadedState<T> value)?, TResult fullLoadedState(_FullLoadedState<T> value)?, TResult errorState(_ErrorState<T> value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult loadingState(bool isRefresh)?, TResult loadedState(bool isRefresh, List<T> data)?, TResult fullLoadedState(bool isRefresh, List<T> data)?, TResult errorState(bool isRefresh, String exception)?, required TResult orElse()}) → TResult
inherited
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 loadingState(bool isRefresh), required TResult loadedState(bool isRefresh, List<T> data), required TResult fullLoadedState(bool isRefresh, List<T> data), required TResult errorState(bool isRefresh, String exception)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? loadingState(bool isRefresh)?, TResult? loadedState(bool isRefresh, List<T> data)?, TResult? fullLoadedState(bool isRefresh, List<T> data)?, TResult? errorState(bool isRefresh, String exception)?}) → TResult?
inherited

Operators

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