evaluate static method
The tier of the first rule that matches facts, else the config's
fallback.
Implementation
static String evaluate(
Map<String, Object?> facts, [
DeviceTierConfig? config,
]) {
final resolved = config ?? DeviceTierConfig.defaults;
for (final rule in resolved.rules) {
if (_matches(rule, facts)) return rule.tier;
}
return resolved.fallback;
}