connect method

  1. @override
StreamSubscription<T> connect()
override

Instructs the ConnectableStream to begin emitting items from the source Stream. To disconnect from the source stream, cancel the subscription.

Implementation

@override
StreamSubscription<T> connect() {
  if (_canReuse(_ConnectableStreamUse.connect)) {
    return _connection;
  }

  _subject.onListen = _subject.onCancel = null;
  return _connection;
}