LocaleGenParams constructor
LocaleGenParams(
- String programName
Implementation
factory LocaleGenParams(String programName) {
final pubspecYaml = File(join(Directory.current.path, 'pubspec.yaml'));
if (!pubspecYaml.existsSync()) {
throw Exception(
'This program should be run from the root of a flutter/dart project');
}
final pubspecContent = pubspecYaml.readAsStringSync();
return LocaleGenParams.fromYamlString(programName, pubspecContent);
}