Notification<T>.onError constructor

Notification<T>.onError(
  1. Object error,
  2. StackTrace? stackTrace
)

Constructs a Notification with Kind.onError and wraps an error and stackTrace

Implementation

factory Notification.onError(Object error, StackTrace? stackTrace) =>
    Notification<T>(
        Kind.onError, EMPTY, ErrorAndStackTrace(error, stackTrace));