add method

void add(
  1. T value
)

Adds a new value to the subject.

Updates the current value and adds it to the stream if the subject is not closed.

Implementation

void add(T value) {
  _value = value;
  if (!_subject.isClosed) _subject.add(value);
}