Pablo
04/29/2025, 1:47 PMwithoutclass
04/29/2025, 2:00 PMPablo
04/29/2025, 2:16 PMwithoutclass
04/29/2025, 2:20 PMwithoutclass
04/29/2025, 2:20 PMwithoutclass
04/29/2025, 2:21 PMwithoutclass
04/29/2025, 2:27 PMPablo
04/29/2025, 3:01 PMRegan
05/11/2025, 12:16 PMval appModule = module {
// Strict flow = Routes → Services → Repositories → Data Sources
singleOf(::ItemRepositoryImpl) { bind<ItemRepository>() }
singleOf(::ItemService)
singleOf(::InventoryService)
...
}
Then I can call the singleton service (or viewmodel) from my route (or view or other places as needed).
fun Route.itemRoute(
itemService: ItemService,
inventoryService: InventoryService,
costService: CostService,
) {
Regards,