value property

  1. @override
T value
override

The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.

Implementation

@override
T get value {
  if (!_hasValue)
    throw StateError("You cannot get the last value the stream subscription "
        "emitted, because there is none. Wait until hasLastValue "
        "turns to true");

  return _value;
}
  1. @override
void value=(T newValue)
override

Implementation

@override
set value(T newValue) => throw StateError(
      "You cannot manually change the value of a StreamSubscriptionNotifier.",
    );