ValueSubject<T> constructor
ValueSubject<T> ({
- bool sync = false,
Contructs a new ValueSubject.
The subject has no value until add is called for the first time.
Implementation
factory ValueSubject({bool sync = false}) {
var controller = StreamController<T>.broadcast(sync: sync);
var currentValue = _CurrentValue<T>();
return ValueSubject._(controller, currentValue, sync);
}