allHealths property

Stream<Map<Type, DatumHealth>> get allHealths

A stream that aggregates the health status of all registered managers.

Implementation

Stream<Map<Type, DatumHealth>> get allHealths {
  if (_managers.isEmpty) {
    return Stream.value({});
  }
  final healthStreams = _managers.allManagers.map((m) => m.health).toList();
  final types = _managers.keys.toList();

  return CombineLatestStream.list(healthStreams).map((healthList) {
    return Map.fromIterables(types, healthList);
  });
}