makeModel static method

dynamic makeModel(
  1. String className,
  2. String value, {
  3. String folderPath = modelsFolder,
  4. bool storable = false,
  5. bool forceCreate = false,
})

Creates a new Model.

Implementation

static makeModel(String className, String value,
    {String folderPath = modelsFolder,
    bool storable = false,
    bool forceCreate = false}) async {
  String filePath = '$folderPath/${className.toLowerCase()}.dart';

  await _makeDirectory(folderPath);
  await _checkIfFileExists(filePath, shouldForceCreate: forceCreate);
  await _createNewFile(filePath, value);
}