listInBatches method

Stream<Iterable<Track>> listInBatches(
  1. Iterable<String> trackIds, [
  2. int batchSize = 50
])

queries track batches of size queryLimit from trackIds and yields Track object Iterables

Implementation

Stream<Iterable<Track>> listInBatches(Iterable<String> trackIds,
    [int batchSize = 50]) async* {
  for (final batch in batches(trackIds, batchSize)) {
    yield await list(batch);
  }
}