removeCachedEntity<O> method

O? removeCachedEntity<O>(
  1. dynamic id, {
  2. Type? type,
})

Removes an entity of type with id of this cache.

Implementation

O? removeCachedEntity<O>(dynamic id, {Type? type}) {
  if (id == null) return null;
  type ??= O;
  var typeEntities = _entities[type];
  var entity = typeEntities?.remove(id) as O?;
  return entity;
}