dispose method

  1. @mustCallSuper
void dispose()

Implementation

@mustCallSuper
void dispose() {
  // close all state stream controllers
  _streamControllers.forEach((s) {
    s.close();
  });
  // dispose all collection controllers
  _collectionControllers.forEach((s) {
    s.dispose();
  });
  // cancel all prerecorded stream subscriptions
  _streamSubscriptions.forEach((s) {
    s.cancel();
  });
}