close method

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

Closes the BloC. This method should be called when the BloC is no longer needed.

Implementation

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

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