value property

  1. @override
T get value
override

Compute the current value

Implementation

@override
T get value {
  if (_lazy) {
    throw LazySignalInitializationError(this);
  }
  if (disposed) {
    if (kDebugMode) {
      print(
          'signal warning: [$globalId|$debugLabel] has been read after disposed: ${StackTrace.current}');
    }
    return _value;
  }

  final node = _addDependency(this);
  if (node != null) {
    node._version = _version;
  }
  return _value;
}
set value (T val)

Set the current value

Implementation

set value(T val) {
  if (disposed) {
    throw SignalsWriteAfterDisposeError(this);
  }
  set(val);
}