getGroupForClass method

Group? getGroupForClass(
  1. String className
)

Implementation

Group? getGroupForClass(String className) {
  for (final group in groups.entries) {
    for (final pattern in group.value) {
      if (RegExp(pattern).hasMatch(className)) {
        final priority = getPriorityForGroup(group.key);
        if (priority == null) return null;
        return Group(name: group.key, priority: priority);
      }
    }
  }

  return null;
}