byPhase property

Map<String?, Leaks> byPhase
latefinal

Implementation

late final Map<String?, Leaks> byPhase = () {
  final leaks = <String?, Map<LeakType, List<LeakReport>>>{};
  for (final entry in byType.entries) {
    for (final leak in entry.value) {
      leaks
          .putIfAbsent(leak.phase, () => {})
          .putIfAbsent(entry.key, () => <LeakReport>[])
          .add(leak);
    }
  }
  return {
    for (final entry in leaks.entries) entry.key: Leaks(entry.value),
  };
}();