How to make item appear in the center of the screen Jetpack Compose when using LazyRow or Column?
I have been trying to make it so that the first item on a LazyRow is centered in the middle of the screen.
LazyRow with snapper and infinite scrolling
@OptIn(ExperimentalSnapperApi::class)
@Composable
fun CircularList(
data: List,
modifier: Modifier = Modifier,
isEndless: Boolean = true
) {
val listState = rememberLazyListState(
if (isEndless) Int.MAX_VALUE / 2 else 0
)
val configuration = LocalConfiguration.current
val screenWidth =...