call method

Future<BatchOutcome<TId, TValue>> call(
  1. List<TId> ids,
  2. TKey key
)

The BatchRequest to hand to a fetcher.

Implementation

Future<BatchOutcome<TId, TValue>> call(List<TId> ids, TKey key) async {
  final index = calls.length;
  calls.add(List<TId>.unmodifiable(ids));
  keys.add(key);
  final step = steps[index < steps.length ? index : steps.length - 1];
  return step(ids, key);
}