StatefulState<Data> class Null safety

State used by the stateful bloc extension

It's designed to be a seamless, flexible extension of a user provided Data state type by embedding it along with two standardized statuses that track loading and submission.

Inheritance

Constructors

StatefulState({Data? data, ActionStatus loadingStatus = ActionStatus.initial, ActionStatus submissionStatus = ActionStatus.initial})
Creates an instance of Stateful State [...]

Properties

beingLoaded bool
Returns if the data is currently being loaded
read-only
beingSubmitted bool
Returns if the data is currently being submitted
read-only
data → Data?
User provided state data
final
hashCode int
The hash code for this object. [...]
read-only, inherited
loadCanceled bool
Returns if the data loading was canceled
read-only
loaded bool
Returns if the data was loaded successfully
read-only
loadFailed bool
Returns if the data was not loaded due a failure
read-only
loadingStatus ActionStatus
Current data loading state
final
notLoaded bool
Returns if the data is not yet loaded
read-only
notSubmitted bool
Returns if the data is not yet submitted
read-only
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props. [...]
read-only, inherited
submissionStatus ActionStatus
Current data submission state
final
submitCanceled bool
Returns if the data submission was canceled
read-only
submitFailed bool
Returns if the data was not submitted due a failure
read-only
submitted bool
Returns if the data was submitted successfully
read-only

Methods

copyWith({Data? data, ActionStatus? loadingStatus, ActionStatus? submissionStatus}) StatefulState<Data>
Standard state copying method
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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