I got an error that the parameter could not be found while using the Horizontal Pager.


My Compose Version is
"1.2.0-alpha03"
Kotlin Version is
"1.6.0"
This is the canonical code that puts the size of pages in the count in the parameter.
I don't know why. Please help me.
You should know that accompanist is now deprecated and no longer supported and instead you should use androidx.compose.foundation which uses pageCount instead of count. Read this Migration guidance to understand more. Here is a quick fix
val pagerState = rememberPagerState(pageCount = { 3 })
HorizontalPager(state = pagerState, verticalAlignment = Alignment.Top) {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With