Lucas Prioste
02/07/2025, 9:40 AMRoute
that I'm trying to inject. It works fine on Android, but on iOS, I get the following build error:
error: Argument type mismatch: actual type is 'kotlin.Any', but 'dev.pinkroom.loyaltycardapp.presentation.core.navigation.Route' was expected.
error: Compilation finished with errors.
Here's the code I'm using for injection:
val destinationModule = module {
single<Route> { getInitialDestination(get()) }
}
private fun getInitialDestination(localPreferences: LocalPreferences) =
localPreferences.getSession()?.let { Route.HomeScreen } ?: Route.WelcomeScreen
Does anyone know how to fix this? Any help is appreciated!Pedro Alberto
02/07/2025, 12:47 PMval destinationModule = module {
single<Route> { getInitialDestination(get()) }
}
Lucas Prioste
02/07/2025, 12:51 PM