Repeater<T>.fromStream constructor

Repeater<T>.fromStream(
  1. Stream<T> source, {
  2. Future onCancel()?,
  3. bool isSync = false,
})

Implementation

factory Repeater.fromStream(Stream<T> source,
        {Future<dynamic> Function()? onCancel, bool isSync = false}) =>
    source.isBroadcast
        ? Repeater.broadcast(
            onListenEmitFrom: () => source,
            onCancel: onCancel,
            isSync: isSync)
        : Repeater(
            onListenEmitFrom: () => source,
            onCancel: onCancel,
            isSync: isSync);