VirtualList

@JvmName(name = "VirtualListState7e3481099f80_1")
fun <T : Any, K : Any> UiScope.VirtualList(itemCount: Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int? = { target -> (0 until itemCount).firstOrNull { index -> keyAt(index) == target } }, scrollRate: Int = 10, canLoadLeading: StateSource<Boolean>, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)
@JvmName(name = "VirtualListState4013cecb450b_1")
fun <T : Any, K : Any> UiScope.VirtualList(itemCount: () -> Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int?? = null, scrollRate: Int = 10, canLoadLeading: StateSource<Boolean>, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)
@JvmName(name = "VirtualListState91e435daa5f9_2")
fun <T : Any, K : Any> UiScope.VirtualList(items: List<T>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: StateSource<Boolean>, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Observes canLoadLeading for VirtualList at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow VirtualList. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


@JvmName(name = "VirtualListState7e3481099f80_2")
fun <T : Any, K : Any> UiScope.VirtualList(itemCount: Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int? = { target -> (0 until itemCount).firstOrNull { index -> keyAt(index) == target } }, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)
@JvmName(name = "VirtualListState4013cecb450b_2")
fun <T : Any, K : Any> UiScope.VirtualList(itemCount: () -> Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int?? = null, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)
@JvmName(name = "VirtualListState91e435daa5f9_4")
fun <T : Any, K : Any> UiScope.VirtualList(items: List<T>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Observes canLoadTrailing for VirtualList at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow VirtualList. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


@JvmName(name = "VirtualListState7e3481099f80_3")
fun <T : Any, K : Any> UiScope.VirtualList(itemCount: Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int? = { target -> (0 until itemCount).firstOrNull { index -> keyAt(index) == target } }, scrollRate: Int = 10, canLoadLeading: StateSource<Boolean>, canLoadTrailing: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)
@JvmName(name = "VirtualListState4013cecb450b_3")
fun <T : Any, K : Any> UiScope.VirtualList(itemCount: () -> Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int?? = null, scrollRate: Int = 10, canLoadLeading: StateSource<Boolean>, canLoadTrailing: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)
@JvmName(name = "VirtualListState91e435daa5f9_6")
fun <T : Any, K : Any> UiScope.VirtualList(items: List<T>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: StateSource<Boolean>, canLoadTrailing: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Observes canLoadLeading, canLoadTrailing for VirtualList at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow VirtualList. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


@JvmName(name = "VirtualListState91e435daa5f9_1")
fun <T : Any, K : Any> UiScope.VirtualList(items: StateSource<List<T>>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Observes items for VirtualList at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow VirtualList. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


@JvmName(name = "VirtualListState91e435daa5f9_3")
fun <T : Any, K : Any> UiScope.VirtualList(items: StateSource<List<T>>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: StateSource<Boolean>, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Observes items, canLoadLeading for VirtualList at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow VirtualList. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


@JvmName(name = "VirtualListState91e435daa5f9_5")
fun <T : Any, K : Any> UiScope.VirtualList(items: StateSource<List<T>>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Observes items, canLoadTrailing for VirtualList at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow VirtualList. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


@JvmName(name = "VirtualListState91e435daa5f9_7")
fun <T : Any, K : Any> UiScope.VirtualList(items: StateSource<List<T>>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: StateSource<Boolean>, canLoadTrailing: StateSource<Boolean>, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Observes items, canLoadLeading, canLoadTrailing for VirtualList at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow VirtualList. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


fun <T : Any, K : Any> UiScope.VirtualList(itemCount: Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int? = { target -> (0 until itemCount).firstOrNull { index -> keyAt(index) == target } }, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Emits a fixed-row virtual viewport backed by a known finite indexed source.

Only visible rows plus one overscan row on each edge are constructed and retained. state supports index and key jumps and exposes its ScrollState for a separately placed optional Scrollbar. Data access and row construction are owner-thread operations performed immediately before a dirty measure pass.

Receiver

active owner-thread UI scope.

Parameters

itemCount

non-negative known source size.

itemAt

indexed item accessor called only for materialized rows.

keyAt

stable key accessor called only for materialized rows and key validation.

indexOfKey

optional efficient key resolver; the default scans keys without materializing row content.

state

caller-owned navigation and shared scroll state.

viewportSize

exact positive viewport size.

rowHeight

positive fixed logical row height.

scrollRate

positive wheel multiplier.

canLoadLeading

whether upward boundary input emits a leading load request through modifier.

canLoadTrailing

whether downward boundary input emits a trailing load request through modifier.

modifier

active viewport behavior.

key

optional stable sibling identity.

content

deferred callback that emits exactly one row root.

Type Parameters

T

immutable row model type.

K

stable row key type.


fun <T : Any, K : Any> UiScope.VirtualList(itemCount: () -> Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int?? = null, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Emits a fixed-row virtual viewport backed by a caller-owned dynamic indexed source.

itemCount is sampled exactly once while this description is created and once after each explicit VirtualListState.refresh. itemAt, keyAt, and indexOfKey are read only against the most recently sampled non-negative count. Complete a source mutation before calling VirtualListState.refresh on its owner thread. Refresh reconstructs the materialized rows even when the count is unchanged and preserves the last visible stable key and its intra-row offset when that key remains. A refresh requested before attachment is retained until a list attaches. Only visible rows plus one overscan row on each edge are constructed and retained.

Receiver

active owner-thread UI scope.

Parameters

itemCount

owner-thread source-size accessor returning a non-negative count at each explicit sampling boundary.

itemAt

indexed item accessor for the current sampled source revision.

keyAt

stable key accessor for the current sampled source revision.

indexOfKey

optional efficient resolver for the current source revision; null scans keyAt within the sampled count.

state

caller-owned navigation, invalidation, and shared scroll state.

viewportSize

exact positive viewport size.

rowHeight

positive fixed logical row height.

scrollRate

positive wheel multiplier.

canLoadLeading

whether upward boundary input emits a leading load request through modifier.

canLoadTrailing

whether downward boundary input emits a trailing load request through modifier.

modifier

active viewport behavior.

key

optional stable sibling identity.

content

deferred callback that emits exactly one row root.

Type Parameters

T

row model type owned by the caller.

K

stable row key type.

Throws

when a sampled item count is negative or a non-null resolved key index is outside that sample.

when refresh or data access violates the owner-thread contract.


fun <T : Any, K : Any> UiScope.VirtualList(items: List<T>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)(source)

Emits a fixed-row virtual viewport backed by an immutable in-memory list.

Receiver

active owner-thread UI scope.

Parameters

items

immutable source snapshot; callers must replace rather than mutate it while attached.

keyOf

stable row key mapping.

state

caller-owned navigation and shared scroll state.

viewportSize

exact positive viewport size.

rowHeight

positive fixed logical row height.

scrollRate

positive wheel multiplier.

canLoadLeading

whether upward boundary input emits a leading load request through modifier.

canLoadTrailing

whether downward boundary input emits a trailing load request through modifier.

modifier

active viewport behavior.

key

optional stable sibling identity.

content

deferred callback that emits exactly one row root.

Type Parameters

T

immutable row model type.

K

stable row key type.