State<T> class abstract

Base class for all Bloc states of an application that implements common states including error handling and loading states.

Constructors

State({required Set<LoadingState> loadingStates, required Set<Message> messages})
const

Properties

additionalProps → List<Object?>
The concrete class must implement this method to return a list of additional properties that are specific to the concrete class.
no setter
hasError → dynamic
no setter
hashCode → int
The hash code for this object.
no setterinherited
loadingStates → Set<LoadingState>
final
messages → Set<Message>
final
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

Methods

addMessage(Message message, [Object? error, StackTrace? stackTrace]) → T
clearMessages() → T
copyWith({Set<Message>? messages, Set<LoadingState>? loadingStates}) → T
The concrete class must implement this method to return a new instance of the state with the given parameters.
endLoading(LoadingState loadingState) → T
isLoading(List<LoadingState> loadingStates) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peekMessage() → Message?
removeMessage(Message message) → T
startLoading(LoadingState loadingState, {dynamic clearMessages = true}) → T
toString() → String
A string representation of this object.
inherited

Operators

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