feat: add AppModule for Koin dependency injection
This commit introduces `AppModule.kt`, a Koin module that provides dependencies for `AuthRepository` and `UserPreferences`.
This commit is contained in:
parent
eb60c366b4
commit
2b4c3cd55a
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.syaroful.agrilinkvocpro.di
|
||||||
|
|
||||||
|
import com.syaroful.agrilinkvocpro.data.UserPreferences
|
||||||
|
import com.syaroful.agrilinkvocpro.data.repository.AuthRepository
|
||||||
|
import org.koin.android.ext.koin.androidContext
|
||||||
|
import org.koin.dsl.module
|
||||||
|
|
||||||
|
val appModule = module {
|
||||||
|
single { AuthRepository(get()) }
|
||||||
|
single { UserPreferences(androidContext()) }
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user