fetchImpl method

FutureOr<T?> fetchImpl()

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

Implementation

FutureOr<T?> fetchImpl() {
  var entityProvider = this.entityProvider;
  var entityFetcher = _entityFetcher;
  var id = this.id;

  if (id == null) return entity;

  if (entityFetcher != null) {
    return entityFetcher(id, type);
  }

  if (entityProvider == null) return entity;

  return entityProvider.getEntityByID<T>(id, type: type);
}