fetchImpl method

FutureOr<List<T?>?> fetchImpl()

Fetches the entity, but won't set it. Do not call this directly.

Implementation

FutureOr<List<T?>?> fetchImpl() {
  var entityProvider = this.entityProvider;
  var entitiesFetcher = _entitiesFetcher;
  var ids = this.ids;

  if (ids == null) return entities;

  if (entitiesFetcher != null) {
    return entitiesFetcher(ids, type);
  }

  if (entityProvider == null) return entities;

  var l = ids
      .map((id) => entityProvider.getEntityByID<T>(id, type: type))
      .toList()
      .resolveAll();

  return l;
}