JozzBusSubscription<T extends JozzEvent> class
A utility class to help manage event subscriptions.
This class wraps a StreamSubscription and provides a convenient way to cancel the subscription when it's no longer needed.
Constructors
-
JozzBusSubscription.new(Stream<
T> stream, void onData(T)) - Creates a new JozzBusSubscription by listening to the provided stream.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subscription
→ StreamSubscription<
T> -
The underlying stream subscription.
final
Methods
-
cancel(
) → void - Cancels the subscription.
-
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