readJsonFileSync method
Implementation
Map<String, Object> readJsonFileSync(AFCommandContext context, List<String> projectPath, Map<String, Object> defaultValue) {
final generatedPath = projectPath.join(Platform.pathSeparator);
final file = File(generatedPath);
if(!file.existsSync()) {
return defaultValue;
}
final contents = file.readAsStringSync();
final json = jsonDecode(contents);
return Map<String, Object>.from(json);
}