getCachedEntityByMapID<O> method
O?
getCachedEntityByMapID<O>(})
override
Returns a cached entity of type with an id from map entries.
See getEntityIDFromMap.
Implementation
@override
O? getCachedEntityByMapID<O>(
Map<Object?, Object?> map, {
Type? type,
instantiate = true,
}) {
var id = getEntityIDFromMap(map, type: type);
if (id == null) return null;
var cachedEntity = getCachedEntityByID(
id,
type: type,
instantiate: instantiate,
);
return cachedEntity != null ? cachedEntity as O : null;
}