Interface

BringIntoViewRequester

Can be used to send [bringIntoView] requests.

Common
sealed interface BringIntoViewRequester

Can be used to send bringIntoView requests. Pass it as a parameter to Modifier.bringIntoViewRequester().

For instance, you can call bringIntoView() to make all the scrollable parents scroll so that the specified item is brought into the scroll viewport.

Functions

bringIntoView

suspend fun bringIntoView(rect: Rect? = null)

Bring this item into bounds by making all the BringIntoViewModifierNode parents to bring their content appropriately.

This method will not return until this request is satisfied or a newer request interrupts it. If this call is interrupted by a newer call, this method will throw a CancellationException.

Parameters

rect The rectangle (In local coordinates) that should be brought into view. If you don't specify the coordinates, the coordinates of the Modifier.bringIntoViewRequester() associated with this BringIntoViewRequester will be used.