createByType static method

Model? createByType(
  1. Type type, [
  2. dynamic json
])

Implementation

static Model? createByType(Type type, [dynamic json]) {
  if (!modelsNameByType.containsKey(type)) return null;
  return modelsByName[modelsNameByType[type]!]?.call(json);
}