disposeAllStreams method

  1. @visibleForTesting
  2. @protected
void disposeAllStreams()
  • disposed all the stream subscriptions when the bloc is closed and empties the subscriptions map

Implementation

@visibleForTesting
@protected
void disposeAllStreams() {
  if (streamSubscriptions.isNotEmpty) {
    for (final key in streamSubscriptions.keys) {
      disposeStream(streamSubscriptions[key]!);
    }
    streamSubscriptions.clear();
  }
}