ReactiveSubject<T> constructor

ReactiveSubject<T>({
  1. T? initialValue,
})

Creates a ReactiveSubject with a BehaviorSubject.

initialValue is the initial value of the subject, if provided.

Implementation

ReactiveSubject({T? initialValue}) : _subject = BehaviorSubject<T>() {
  if (initialValue != null) add(initialValue);
}