---
title: "NestedPrefetchScope"
description: "A scope which allows nested prefetches to be requested for the precomposition of a LazyLayout."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
@ExperimentalFoundationApi
sealed interface NestedPrefetchScope
```


A scope which allows nested prefetches to be requested for the precomposition of a LazyLayout.


## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val nestedPrefetchItemCount: Int
```


The projected number of nested items that should be prefetched during a Nested Prefetching of
an internal LazyLayout. This will return -1 if a projection isn't available yet. The parent
Lazy Layout will use information about an item's content type and number of visible items to
calculate the necessary number of items that a child layout will need to prefetch.



## Functions

```kotlin
fun schedulePrefetch(index: Int) = schedulePrecomposition(index)
```


Requests a child index to be prefetched as part of the prefetch of a parent LazyLayout.

The prefetch will only do the precomposition for the new item. If you also want to premeasure
please use a second overload accepting a `Constraints` param.

#### Parameters

| | |
| --- | --- |
| index | item index to prefetch. |



```kotlin
fun schedulePrecomposition(index: Int)
```


Requests a child index to be precomposed as part of the prefetch of a parent LazyLayout.

The prefetch will only do the precomposition for the new item. If you also want to premeasure
please use `schedulePrecompositionAndPremeasure`.

#### Parameters

| | |
| --- | --- |
| index | item index to prefetch. |



```kotlin
fun schedulePrefetch(index: Int, constraints: Constraints) =
        schedulePrecompositionAndPremeasure(index, constraints)
```


Requests a child index to be prefetched as part of the prefetch of a parent LazyLayout.

#### Parameters

| | |
| --- | --- |
| index | the index of the child to prefetch. |
| constraints | `Constraints` to use for premeasuring. |



```kotlin
fun schedulePrecompositionAndPremeasure(index: Int, constraints: Constraints)
```


Requests a child index to be precomposed and premeasured as part of the prefetch of a parent
LazyLayout. If you just want to precompose an item use `schedulePrecomposition` instead.

#### Parameters

| | |
| --- | --- |
| index | the index of the child to prefetch. |
| constraints | `Constraints` to use for premeasuring. |




