badgeFor function

String? badgeFor(
  1. List<PluginCheckOutcome> outcomes
)

The badge outcomes earn, as it is written — conformant@1.0 — for the newest suite they pass; null when they pass none.

Implementation

String? badgeFor(List<PluginCheckOutcome> outcomes) {
  final suites = conformanceSuites.keys.toList().reversed;
  for (final suite in suites) {
    if (earnsBadge(outcomes, suite: suite)) return 'conformant@$suite';
  }
  return null;
}