Tag: Ktor

Koin, Ktor & Paging in KMM | Compose Multiplatform | by Prashant | Nov, 2023

@Composablefun <T : Any> PagingListUI(data: LazyPagingItems<T>,content: @Composable (T) -> Unit) {LazyColumn(modifier = Modifier.fillMaxSize().background(Color.White),horizontalAlignment = Alignment.CenterHorizontally,) { items(data.itemCount) { index ->val item = data[index]item?.let { content(it) }Divider(color = UiColor.background,thickness = 10.dp,modifier = Modifier.border(border = BorderStroke(0.5.dp, Color.LightGray)))} data.loadState.apply {when {refresh is LoadStateNotLoading && data.itemCount < 1 ->…