close method

  1. @override
  2. @mustCallSuper
void close()
inherited

Closes the event and state Streams. This method should be called when a BloC is no longer needed.

Implementation

@override
@mustCallSuper
void close() {
  if (!closed && canClose()) {
    super.close();

    internalEventController.close();
    externalEventController.close();
    eventSubscriptions.cancel();
  }
}