StatefulState<Data> class
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.
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
no setter
- beingSubmitted → bool
-
Returns if the data is currently being submitted
no setter
- data → Data?
-
User provided state data
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- loadCanceled → bool
-
Returns if the data loading was canceled
no setter
- loaded → bool
-
Returns if the data was loaded successfully
no setter
- loadFailed → bool
-
Returns if the data was not loaded due a failure
no setter
- loadingStatus → ActionStatus
-
Current data loading state
final
- notLoaded → bool
-
Returns if the data is not yet loaded
no setter
- notSubmitted → bool
-
Returns if the data is not yet submitted
no setter
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - submissionStatus → ActionStatus
-
Current data submission state
final
- submitCanceled → bool
-
Returns if the data submission was canceled
no setter
- submitFailed → bool
-
Returns if the data was not submitted due a failure
no setter
- submitted → bool
-
Returns if the data was submitted successfully
no setter
Methods
-
copyWith(
{Data? data, ActionStatus? loadingStatus, ActionStatus? submissionStatus}) → StatefulState< Data> - Standard state copying method
-
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