# PagingSource.LoadParams.Prepend

Artifact: [androidx.paging:paging-common](https://developer.android.com/jetpack/androidx/releases/paging) [View Source](https://cs.android.com/search?q=file:androidx/paging/PagingSource.kt+class:androidx.paging.PagingSource.LoadParams.Prepend) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/paging#3.0.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  class PagingSource.LoadParams.Prepend<Key : Any> : PagingSource.LoadParams<Key>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.paging.PagingSource.LoadParams](https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams)\<Key\> ||
|   | ↳ | [androidx.paging.PagingSource.LoadParams.Prepend](https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Prepend) |

*** ** * ** ***

Params to load a page of data from a `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` via `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#load(androidx.paging.PagingSource.LoadParams)` to be prepended to the start of the list.

## Summary

| ### Public constructors |
|---|---|
| `<Key : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Prepend#Prepend(kotlin.Any,kotlin.Int,kotlin.Boolean)(key: Key, loadSize: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, placeholdersEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` | Cmn |

| ### Public properties |
|---|---|---|
| `open Key` | `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Prepend#key()` Key for the page to be loaded. | Cmn |

### Inherited properties

From [androidx.paging.PagingSource.LoadParams](https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams#loadSize()`

Requested number of items to load.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams#placeholdersEnabled()`

From `https://developer.android.com/reference/kotlin/androidx/paging/PagingConfig#enablePlaceholders()`, true if placeholders are enabled and the load request for this `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams` should populate `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page#itemsBefore()` and `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page#itemsAfter()` if possible.
Cmn

## Public constructors

### Prepend

Cmn

```
<Key : Any> Prepend(key: Key, loadSize: Int, placeholdersEnabled: Boolean)
```

## Public properties

### key

Cmn

```
open val key: Key
```

Key for the page to be loaded.

`https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams#key()` can be `null` only if this `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams` is `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Refresh`, and either no `initialKey` is provided to the `https://developer.android.com/reference/kotlin/androidx/paging/Pager` or `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#getRefreshKey(androidx.paging.PagingState)` from the previous `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource` returns `null`.

The value of `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams#key()` is dependent on the type of `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams`:

- `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Refresh`

  - On initial load, the nullable `initialKey` passed to the `https://developer.android.com/reference/kotlin/androidx/paging/Pager`.

  - On subsequent loads due to invalidation or refresh, the result of `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource#getRefreshKey(androidx.paging.PagingState)`.

- `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Prepend` - `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page#prevKey()` of the loaded page at the front of the list.

- `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadParams.Append` - `https://developer.android.com/reference/kotlin/androidx/paging/PagingSource.LoadResult.Page#nextKey()` of the loaded page at the end of the list.