close method

  1. @override
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 and will result in an error being passed to onError. In addition, if close is called while events are still being processed, the bloc will continue to process the pending events to completion.


Future<void> close() {
  return Future<void>.value();