# LazyGridPrefetchResultScope

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/lazy/grid/LazyGridPrefetchStrategy.kt+class:androidx.compose.foundation.lazy.grid.LazyGridPrefetchResultScope) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0) Deprecated in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01) Common/All
- Cmn

  ```
  @ExperimentalFoundationApi
  sealed interface LazyGridPrefetchResultScope
  ```

*** ** * ** ***

> [!CAUTION]
> **This interface is deprecated.**   
> LazyGridPrefetchResultScope is deprecated alongside LazyGridPrefetchStrategy. Prefetching behavior should be configured using LazyLayoutCacheWindow.

A scope for `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/LazyGridPrefetchScope#scheduleLinePrefetch(kotlin.Int)` callbacks. The scope provides additional information about a prefetched item.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `[getMainAxisSize](https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/LazyGridPrefetchResultScope#getMainAxisSize(kotlin.Int))(itemIndexInLine: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** LazyGridPrefetchResultScope is deprecated alongside LazyGridPrefetchStrategy. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/LazyGridPrefetchResultScope#lineIndex()` **This property is deprecated.** LazyGridPrefetchResultScope is deprecated alongside LazyGridPrefetchStrategy. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/LazyGridPrefetchResultScope#lineItemCount()` **This property is deprecated.** LazyGridPrefetchResultScope is deprecated alongside LazyGridPrefetchStrategy. | Cmn |

## Public functions

### getMainAxisSize

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0) Deprecated in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
fun [getMainAxisSize](https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/LazyGridPrefetchResultScope#getMainAxisSize(kotlin.Int))(itemIndexInLine: Int): Int
```

> [!CAUTION]
> **This function is deprecated.**   
> LazyGridPrefetchResultScope is deprecated alongside LazyGridPrefetchStrategy. Prefetching behavior should be configured using LazyLayoutCacheWindow.

Returns the main axis size in pixels of a prefecthed item in this line. `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/LazyGridPrefetchResultScope#getMainAxisSize(kotlin.Int)` is the item index from 0 to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/lazy/grid/LazyGridPrefetchResultScope#lineItemCount()` -1.

## Public properties

### lineIndex

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0) Deprecated in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
val lineIndex: Int
```

> [!CAUTION]
> **This property is deprecated.**   
> LazyGridPrefetchResultScope is deprecated alongside LazyGridPrefetchStrategy. Prefetching behavior should be configured using LazyLayoutCacheWindow.

The index of the prefetched line

### lineItemCount

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0) Deprecated in [1.13.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.13.0-rc01)

```
val lineItemCount: Int
```

> [!CAUTION]
> **This property is deprecated.**   
> LazyGridPrefetchResultScope is deprecated alongside LazyGridPrefetchStrategy. Prefetching behavior should be configured using LazyLayoutCacheWindow.

The number of items in this prefetched line.