getSubject method
Returns the stream of a certain id
.
If there's no stream BehaviorSubject
defined for id
, a new BehaviorSubject
is created and assigned.
In all cases a BehaviorSubject
is returned.
Implementation
BehaviorSubject<dynamic>? getSubject(String id) {
_buses[id] ??= BehaviorSubject<dynamic>();
return _buses[id];
}