getSubject method

BehaviorSubject? getSubject(
  1. String id
)

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];
}