How to Create module class for work manager dependency in kotlin
I have a Worker class that needs an app repository class and the app repository class depends on the API service class. API service class in an interface. I do not know how to create a module class that provides dependency for the Worker class.
I create a module class below
@Module
@InstallIn(ViewModelComponent::class)
object ApiModule {
@Provides
fun provideLaunchListApi(retrofit: Retrofit): API {
return retrofit.create(API::class.java)
}
I doubt that I am not passing correct input for...