abort method

Future<void> abort()

Stops stream from emitting more data. Returns a Future that completes when the underlying data source of stream has been successfully closed.

Calling abort will make done to complete immediately.

Implementation

Future<void> abort() async {
  _doneCompleter.complete();
  await _subscription.cancel();
}