ReactiveSubject<T>.broadcast constructor

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

Creates a ReactiveSubject with a PublishSubject.

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

Implementation

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