StreamNotificationExtensions<T> extension
Provides extension methods on StreamNotification.
- on
Properties
- dataValueOrNull → T?
-
Available on StreamNotification<
Returns data if kind is NotificationKind.data, otherwise returns null.T> , provided by the StreamNotificationExtensions extensionno setter - errorAndStackTraceOrNull → ErrorAndStackTrace?
-
Available on StreamNotification<
Returns error and stack trace if kind is NotificationKind.error, otherwise returns null.T> , provided by the StreamNotificationExtensions extensionno setter - isData → bool
-
Available on StreamNotification<
A test to determine if this StreamNotification wraps a data event.T> , provided by the StreamNotificationExtensions extensionno setter - isDone → bool
-
Available on StreamNotification<
A test to determine if this StreamNotification wraps a done event.T> , provided by the StreamNotificationExtensions extensionno setter - isError → bool
-
Available on StreamNotification<
A test to determine if this StreamNotification wraps an error event.T> , provided by the StreamNotificationExtensions extensionno setter - requireDataValue → T
-
Available on StreamNotification<
Returns data if kind is NotificationKind.data, otherwise throws a TypeError error. See also dataValueOrNull.T> , provided by the StreamNotificationExtensions extensionno setter - requireErrorAndStackTrace → ErrorAndStackTrace
-
Available on StreamNotification<
Returns error and stack trace if kind is NotificationKind.error, otherwise throws a TypeError error.T> , provided by the StreamNotificationExtensions extensionno setter
Methods
-
when<
R> ({required R data(T value), required R done(), required R error(ErrorAndStackTrace)}) → R -
Available on StreamNotification<
Invokes the appropriate function on the StreamNotification based on the kind.T> , provided by the StreamNotificationExtensions extension