Created
July 3, 2021 09:12
-
-
Save manavtamboli/0d2fd878245fe722409e77887ca99675 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @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