clear method

Future<void>? clear()

Cancels all subscriptions added to this composite. Clears subscriptions collection.

This composite can be reused after calling this method.

Implementation

Future<void>? clear() {
  final cancelAllDone = _subscriptionsList.cancelAll();
  _subscriptionsList.clear();
  return cancelAllDone;
}