🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

performScrollToKey

Scrolls a scrollable container with keyed items to the item with the given key, such as LazyColumn or LazyRow.

performScrollToKey

Source set: Common
public fun SemanticsNodeInteraction.performScrollToKey(key: Any): SemanticsNodeInteraction

Scrolls a scrollable container with keyed items to the item with the given key, such as LazyColumn or LazyRow.

This action should be performed on a node that is a scrollable container, not on a node that is part of the content of that container.

Throws an AssertionError if the node doesn't have IndexForKey or ScrollToIndex defined.

Parameters

key The key of the item to scroll to

Return

The SemanticsNodeInteraction that is the receiver of this method