Created
May 2, 2023 19:14
-
-
Save saqib-github-commits/869d44c2153cf5f5613b6f13d729a850 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( | |
enabled = prevButtonVisible.value, | |
onClick = { | |
val prevPageIndex = pagerState.currentPage - 1 | |
coroutineScope.launch { pagerState.animateScrollToPage(prevPageIndex) } | |
}, | |
) { | |
Text(text = "Prev") | |
} | |
Button( | |
enabled = nextButtonVisible.value , | |
onClick = { | |
val nextPageIndex = pagerState.currentPage + 1 | |
coroutineScope.launch { pagerState.animateScrollToPage(nextPageIndex) } | |
}, | |
) { | |
Text(text = "Next") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment