resolveEnabledPlugins function
'hub' ships default-on. A .fah/packages.yaml entry enables a plugin
with a truthy value (inspect_image:/hub: {url: …}) and opts it OUT
with a falsy one (hub: false, hub:) — so only the keys with truthy
values join the enabled set.
Implementation
Set<String> resolveEnabledPlugins(
List<String> argPlugins,
Map<String, dynamic> config,
) {
final enabled = <String>{'hub', ...argPlugins};
for (final entry in config.entries) {
if (entry.value == null || entry.value == false) {
enabled.remove(entry.key);
} else {
enabled.add(entry.key);
}
}
return enabled;
}