copy method

  1. @override
EntityReferenceList<T> copy({
  1. bool withEntity = true,
})
override

Returns a copy of this EntityReference instance.

Implementation

@override
EntityReferenceList<T> copy({bool withEntity = true}) {
  var cp = EntityReferenceList<T>._(
      _type,
      _typeName,
      _ids?.toList(),
      withEntity ? _entities?.toList() : null,
      null,
      _entityHandler,
      _entityProvider,
      _entityHandlerProvider,
      _entitiesFetcher,
      _entityCache,
      false);

  if (withEntity) cp._entitiesTime = _entitiesTime;

  return cp;
}