Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save manavtamboli/0d2fd878245fe722409e77887ca99675 to your computer and use it in GitHub Desktop.

Select an option

Save manavtamboli/0d2fd878245fe722409e77887ca99675 to your computer and use it in GitHub Desktop.
@Composable
fun MyContent(listItems : List<Data>){
val listState = rememberLazyListState()
LazyColumn(state = listState){
items(listItems){
// ...
}
}
// call the extension function
listState.OnBottomReached {
// do on load more
viewModel.fetchMoreItems()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment