value property

TState get value

The current state of the logic block.

Throws a StateError if the logic block has not been started.

Implementation

TState get value {
  if (_value == null) {
    throw StateError(
      'Cannot access value before the logic block has been started. '
      'Call start() first.',
    );
  }
  return _value!;
}