ValueStreamExtensions<T> extension Null safety

Extensions to access value and error easily.

on

Properties

error Object?
Last emitted error, or null if no error added or value exists.
read-only
hasError bool
A flag that turns true as soon as at an error event has been emitted.
read-only
hasValue bool
A flag that turns true as soon as at least one event has been emitted.
read-only
requireError Object
Last emitted error, or throws "Null check operator used on a null value" error if no error added or value exists.
read-only
requireValue → T
Returns last emitted value, or throws "Null check operator used on a null value" error if there has been no emission yet.
read-only
value → T?
Returns last emitted value, or null if there has been no emission yet.
read-only