subscribeTo method

void subscribeTo(
  1. Stream<Iterable<V>> other, {
  2. bool sync = false,
})

Implementation

void subscribeTo(Stream<Iterable<V>> other, {bool sync = false}) {
  disposers.add(other.asyncMap((items) async {
    await this.sync(items, async: sync != true);
  }).listen((_) {
    // nothing to do
  }, cancelOnError: false).cancel);
}