Last active
October 19, 2021 12:17
-
-
Save victorbrndls/e691c6a88219b2ba2336708bc08fad7e 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
val listState = rememberLazyListState() | |
LazyColumn( | |
contentPadding, | |
verticalArrangement / horizontalArrangement = Arrangement.spacedBy | |
) { | |
stickyHeader { Header() } // Experimental | |
items(5) { index -> Text(text = "Item: $index") } // key = ... | |
item { Text(text = "Last item") } | |
} | |
LaunchedEffect(listState) { | |
snapshotFlow { listState.firstVisibleItemIndex } | |
} | |
firstVisibleItemIndex | |
firstVisibleItemScrollOffset | |
scrollToItem() | |
animateScrollToItem() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment