close method
Closes the BloC. This method should be called when the BloC is no longer needed.
Implementation
@mustCallSuper
void close() {
if (!closed && canClose()) {
closed = true;
stateController.close();
errorController.close();
analyticsEventController.close();
subxList.cancelAll();
subxMap.cancelAll();
for (final publisher in publishers) {
publisher.close();
}
}
}