writeJsonFileSync method

void writeJsonFileSync(
  1. AFCommandContext context,
  2. List<String> projectPath,
  3. Map<String, Object> json
)

Implementation

void writeJsonFileSync(AFCommandContext context, List<String> projectPath, Map<String, Object> json) {
  final generatedPath = projectPath.join(Platform.pathSeparator);
  final file = File("${AFibD.currentWorkingDirectory}${Platform.pathSeparator}$generatedPath");
  final encoded = jsonEncode(json);
  file.writeAsStringSync(encoded);
}