of method

Map<String, Object?> of(
  1. String id, {
  2. required String own,
})

The reports named id by isolate: this isolate's (under own's name) first, then the others in the order of their numbers (isolate-2 before isolate-10).

Implementation

Map<String, Object?> of(String id, {required String own}) {
  final others = _remote.keys.toList()
    ..sort(
      (a, b) => a.length != b.length
          ? a.length.compareTo(b.length)
          : a.compareTo(b),
    );
  return {
    for (final reporter in reporters)
      if (reporter.id == id) own: reporter.report(),
    for (final isolate in others)
      if (_remote[isolate]!.containsKey(id)) isolate: _remote[isolate]![id],
  };
}