expectVantageEventSourceIsBroadcast function
Asserts source exposes a broadcast stream. The host holds one subscription
and panels may hold more, so a single-subscription controller would make the
second listener throw at runtime.
Implementation
void expectVantageEventSourceIsBroadcast(EventSource source) {
expect(
source.events.isBroadcast,
isTrue,
reason: 'EventSource.events must be a broadcast stream: use '
'StreamController.broadcast(). The host subscribes once and panels may '
'subscribe too.',
);
}