getCachedEntityByID<O> method

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

Returns a cached entity of type with id.

Implementation

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

  return entity;
}