smartScrollToTop

fun LazyListState.smartScrollToTop(coroutineScope: CoroutineScope)(source)

Executes the smart scroll-to-top policy.

Policy:

  • If the first visible item is already at index 0, do nothing.

  • Otherwise, smoothly animate the list back to the first item.