onError property

void Function(BuildContext, Object, StackTrace)? onError
final

Callback triggered once any error happens on the listened stream.

The onError argument may be null, in which case further error events are considered unhandled, and will be reported to Zone.handleUncaughtError.

The provided function is called for all error events from the stream subscription.

Implementation

final void Function(BuildContext, Object, StackTrace)? onError;