value property Null safety

T value
override

Returns the last emitted value, failing if there is no value. See hasValue to determine whether value has already been set.

Throws ValueStreamError if this Stream has no value.

Implementation

@override
T get value {
  final wrapper = _wrapper.value;
  if (wrapper != null) {
    return wrapper.value;
  }
  throw ValueStreamError.hasNoValue();
}
void value=(T newValue)

Set and emit the new value.

Implementation

set value(T newValue) => add(newValue);