Acts as a container for multiple subscriptions that can be canceled at once e.g. view subcriptions in Flutter that need to be canceled on view disposal
Can be cleared or disposed. When disposed, cannot be used again.
// init your subscriptions composite.add(observable1.listen(listener1)) ..add(observable2.listen(listener1)) ..add(observable3.listen(listener1));
// clear them all at once composite.clear();
- hashCode → int
The hash code for this object. [...]
- isDisposed → bool
Checks if this composite is disposed. If it is, the composite can't be used again
and will throw an error if you try to add more subscriptions to it.
- runtimeType → Type
A representation of the runtime type of the object.
T>( StreamSubscription< T>subscription) → StreamSubscription< T>
- Adds new subscription to this composite. [...]
) → void
- Cancels all subscriptions added to this composite. Clears subscriptions collection. [...]
) → void
- Cancels all subscriptions added to this composite. Disposes this. [...]
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
StreamSubscription subscription) → void
- Cancels subscripiton and removes it from this composite.
) → String
Returns a string representation of this object.