entityForType method
Returns a ManagedEntity for a Type.
type
may be either a subclass of ManagedObject or a ManagedObject's table definition. For example, the following
definition, you could retrieve its entity by passing MyModel or _MyModel as an argument to this method:
class MyModel extends ManagedObject<_MyModel> implements _MyModel {}
class _MyModel {
@primaryKey
int id;
}
Implementation
ManagedEntity? entityForType(Type type) {
return _entities[type] ?? _tableDefinitionToEntityMap[type.toString()];
}