getCachedEntityByID<O> method
Returns a cached entity of type with id.
Implementation
@override
O? getCachedEntityByID<O>(dynamic id, {Type? type, instantiate = true}) {
if (id == null) return null;
type ??= O;
var typeEntities = _entities?[type];
var entity = typeEntities?[id] as O?;
if (entity == null && instantiate) {
entity = _instantiateEntity(type, id) as O?;
}
return entity;
}