RestState class

State of RestBloc

Implementers
Annotations
  • @freezed

Constructors

RestState.error({required String message, required String humanMessage})
State when throws an error
factory
RestState.loaded({required Map<String, List<String>> headers, required String lastPath, required String timestamp, required dynamic data})
Finished state
factory
RestState.loading()
State for loading request
factory
RestState.uninitialized()
Initial state
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult uninitialized(UninitializedRestState value), required TResult error(ErrorRestState value), required TResult loading(LoadingRestState value), required TResult loaded(LoadedRestState value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? uninitialized(UninitializedRestState value)?, TResult? error(ErrorRestState value)?, TResult? loading(LoadingRestState value)?, TResult? loaded(LoadedRestState value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult uninitialized(UninitializedRestState value)?, TResult error(ErrorRestState value)?, TResult loading(LoadingRestState value)?, TResult loaded(LoadedRestState value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult uninitialized()?, TResult error(String message, String humanMessage)?, TResult loading()?, TResult loaded(Map<String, List<String>> headers, String lastPath, String timestamp, dynamic data)?, 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 uninitialized(), required TResult error(String message, String humanMessage), required TResult loading(), required TResult loaded(Map<String, List<String>> headers, String lastPath, String timestamp, dynamic data)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? uninitialized()?, TResult? error(String message, String humanMessage)?, TResult? loading()?, TResult? loaded(Map<String, List<String>> headers, String lastPath, String timestamp, dynamic data)?}) → TResult?
inherited

Operators

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