Is your feature request related to a problem? Please describe.
For Android Viewmodel, i expose nullable coroutine scope in the constructor so that i can pass my own dispatcher for testing and use default implementation on the real app. So the class will look like this
class LoginViewModel(
private val loginUseCase: LoginUseCase,
coroutineScope: CoroutineScope? = null,
) : ViewModel()
Is your feature request related to a problem? Please describe. For Android Viewmodel, i expose nullable coroutine scope in the constructor so that i can pass my own dispatcher for testing and use default implementation on the real app. So the class will look like this
And then i can use it like this:
Unfortunately, if we use constructor DSL, either
Either way, we have to go back to Koin DSL:
It's not a problem when the class only needs few deps, but could become bloated by
get()
if there are many deps.Describe the solution you'd like Add support in constructor DSL to use default value provided in the class declaration.