Created
May 2, 2023 18:56
-
-
Save saqib-github-commits/a852e0bf6197fc2400071e945671fa6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Button to Go To Bottom of the list | |
Button(onClick = { | |
coroutineScope.launch { lazyListState.animateScrollToItem(messages.size - 1) } | |
}) { | |
Text(text = "Go To Bottom") | |
} | |
// Button to Go To Top of the list | |
Button(onClick = { | |
coroutineScope.launch { lazyListState.animateScrollToItem(0) } | |
}) { | |
Text(text = "Go To Top") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment