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

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: