getType static method

ModelType<DataModel> getType(
  1. Type type
)

Implementation

static ModelType getType(Type type) {
  if (!_modelTypes.containsKey(type)) {
    throw Exception(
      "Can not find type $type, may be you have not registered the model class with `DataModel.setType`",
    );
  }
  return _modelTypes[type]!;
}