multicast method
Returns an multicast observable that shares the underlying stream.
Implementation
ConnectableObservable<T> multicast(
{Subject<T>? subject, Map0<Subject<T>>? factory}) {
if (subject != null && factory != null) {
throw ArgumentError.value(
subject, 'subject', 'Subject and factory cannot both be given.');
}
factory ??= () => subject ?? Subject<T>();
return MulticastObservable<T>(this, factory);
}