newModel static method
this function will =>
- create file model class in model folder
- export this file into model.dart file
Implementation
static Future<void> newModel(String modelName) async {
final newModelFile = _getFile('$modelName.dart', _modelFolder);
if (newModelFile.existsSync()) {
print('$modelName is exists before');
return;
}
newModelFile.createSync(recursive: true);
newModelFile.writeAsString(_modelTemp(modelName));
await _exportNewModel(modelName);
await git('new model $modelName', true);
}