onError method
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');
}