CompositeListenableSubscription class final

Acts as a container for multiple subscriptions ListenableSubscription that can be canceled at once.

Example 1:

final composite = CompositeListenableSubscription();

...

composite
  ..add(listenable1.listen(listener1))
  ..add(listenable2.listen(listener2))
  ..add(listenable3.listen(listener3));

...

composite.cancel();

Example 2:

final composite = CompositeListenableSubscription();

...

listenable1.listen(listener1).addTo(composite);
listenable2.listen(listener2).addTo(composite);
listenable3.listen(listener3).addTo(composite);

...

composite.cancel();

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(ListenableSubscription subscription) → void
Adds new subscription to this composite.
cancel() → void
Removes all subscriptions from this composite.
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