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 ->…
Getting Started with Kotlin Multiplatform[2/n]: Moko Shared View Model & Koin DI | by Debanshu Datta | Nov, 2023
After successfully implementing the basic Kotlin multiplatform app in our last blog, we will now focus on following a simple architecture with use cases, dependency injection, Shared View Model etc. We will build on what we built in the first part of the blog. We…