groupOf method
The count column of id, given the prefixes the index uses.
Implementation
String groupOf(String id) {
final dash = id.lastIndexOf('-');
final prefix = id.substring(0, dash);
final number = int.parse(id.substring(dash + 1));
for (final g in groups) {
if (g.holds(prefix, number)) return g.key;
}
return prefix;
}