PulseXState<T> class

Multiple future states occurred when using with FutureViewModel

Constructors

PulseXState({T? value, String? message, PulseXStatus status = PulseXStatus.initial})
PulseXState.error(String message)
Error state PulseXState.error is when api call finishes with error & return relevant error message
factory
PulseXState.initial()
Initial state PulseXState.initial before api call starts
factory
PulseXState.loaded(T? value)
Loaded state PulseXState.loaded is the state when api call finishes without error & returns value
factory
PulseXState.loading()
Loading state PulseXState.loading starts as soon as api call is started
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
message String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status PulseXStatus
getter/setter pair
value ↔ T?
getter/setter pair

Methods

copyWith({T? value, String? message, PulseXStatus? status}) PulseXState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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