modelStub function

String modelStub({
  1. required ReCase modelName,
})

This stub is used to create a new Model.

Implementation

String modelStub({required ReCase modelName}) => '''
import 'package:nylo_framework/nylo_framework.dart';

class ${modelName.pascalCase} extends Model {

  static StorageKey key = "${modelName.snakeCase}";

  ${modelName.pascalCase}() : super(key: key);

  ${modelName.pascalCase}.fromJson(data) {

  }

  @override
  toJson() {
    return {};
  }
}
''';