ScalingLazyListScope

Interface

Android
@ScalingLazyScopeMarker
public sealed interface ScalingLazyListScope

Receiver scope which is used by ScalingLazyColumn.

Functions

public fun item(key: Any? = null, content: @Composable ScalingLazyListItemScope.() -> Unit)

Adds a single item.

Parameters

keya stable and unique key representing the item. Using the same key for multiple items in the list is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the list will represent the key. When you specify the key the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one.
contentthe content of the item
public fun items(
        count: Int,
        key: ((index: Int) -> Any)? = null,
        itemContent: @Composable ScalingLazyListItemScope.(index: Int) -> Unit,
    )

Adds a count of items.

Parameters

countthe items count
keya factory of stable and unique keys representing the item. Using the same key for multiple items in the list is not allowed. Type of the key should be saveable via Bundle on Android. If null is passed the position in the list will represent the key. When you specify the key the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one.
itemContentthe content displayed by a single item