Samir Basnet
11/30/2021, 12:21 PMval scrollState = rememberLazyListState()
val lazyInsuranceItems = pager.collectAsLazyPagingItems()
LazyColumn(state = scrollState) {
itemsIndexed(lazyInsuranceItems) { index,insurance ->
InsuranceCell(insurance!!) {
navController.navigate("InsuranceDetail/${insurance.id}")
}
} }
Trying to create list and detail screens as above but on returing to list the scroll position is lost and returns to top. Can anyone guide me on how to maintain scroll position?Zach Klippenstein (he/him) [MOD]
11/30/2021, 5:02 PM