loadConfigFileFromArgResults function
Backward-compat shim used by test/main_test.dart.
Mirrors the legacy behavior: explicit --file → that file; else the
default flutter_launcher_icons.yaml; else pubspec.yaml. Returns
null when nothing is found.
Implementation
Config? loadConfigFileFromArgResults(ArgResults argResults) {
final String prefixPath = argResults[prefixOption];
final filePath = (argResults[fileOption] as String?) ?? defaultConfigFile;
return Config.loadConfigFromPath(filePath, prefixPath) ??
Config.loadConfigFromPubSpec(prefixPath);
}