run method

  1. @override
Future<List<O>> run(
  1. Map<String, dynamic> shared
)
override

Runs the batch processing by iterating over the items.

This method first calls prep to get the list of items and then iterates over the list, calling exec for each item. The results are collected into a list and returned.

Implementation

@override
Future<List<O>> run(Map<String, dynamic> shared) async {
  final items = await prep(shared);
  final results = <O>[];
  for (final item in items) {
    results.add(await exec(item));
  }
  return results;
}