I wanted to create a scrolling log - LazyColumn lo...
# compose
r
I wanted to create a scrolling log - LazyColumn looks like the right container for that, but how would I scroll to the newest item whenever one is added?
s
Something along this:
Copy code
LaunchedEffect(lazyListState) {
    snapshotFlow {
        lazyListState.layoutInfo.totalItemsCount
    }.collect {
        lazyListState.animateScrollToItem(it)
    }
}