close method

  1. @override
  2. @mustCallSuper
Future<void> close()

Closes the event and state Streams. This method should be called when a Bloc is no longer needed. Once close is called, events that are added will not be processed. In addition, if close is called while events are still being processed, the Bloc will finish processing the pending events.

Implementation

@override
@mustCallSuper
Future<void> close() {
  super.cancel();
  return super.close();
}