JozzLifecycleHandler class
A handler for managing event subscriptions with lifecycle awareness.
This class stores subscriptions and provides a method to dispose them when the associated object's lifecycle ends.
Constructors
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
-
add(
JozzBusSubscription< JozzEvent> subscription) → void - Add a subscription to be managed by this handler.
-
dispose(
) → void - Dispose all managed subscriptions. Call this method in the dispose/close method of your Bloc/Cubit/State.
-
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