DataNotification<T> class
A notification representing a data event from a Stream.
- Inheritance
-
- Object
- StreamNotification<
T> - DataNotification
- Available extensions
Constructors
- DataNotification(T value)
-
Constructs a DataNotification with the provided
value
.const
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 - hashCode → int
-
The hash code for this object.
no setteroverride
- 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 - kind → NotificationKind
-
References the NotificationKind of this StreamNotification event.
finalinherited
- 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 - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
The value of the data event.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override