create<T extends DataModel> static method

dynamic create<T extends DataModel>(
  1. Type type
)

Implementation

static create<T extends DataModel>(Type type) {
  final ModelType modelType = _modelTypes[type]!;
  final T instance = modelType.constructor() as T;
  return instance;
}