generateFileFromJson method

bool generateFileFromJson(
  1. dynamic outputPath,
  2. JsonModel jsonModel,
  3. dynamic name
)

Implementation

bool generateFileFromJson(outputPath, JsonModel jsonModel, name) {
  try {
    File(outputPath)
      ..createSync(recursive: true)
      ..writeAsStringSync(
        ModelTemplates.fromJsonModel(jsonModel),
      );
  } catch (e) {
    print(e);
    return false;
  }
  return true;
}