onError method

void onError(
  1. Object e,
  2. FutureOr<void> dispose()
)

Override this method to handle any errors that occur within the stream. The dispose callback allows for immediate cleanup if necessary.

Implementation

void onError(Object e, FutureOr<void> Function() dispose) {
  print('[$runtimeType] $e');
}