app Module
This commit is contained in:
@@ -1,22 +1,32 @@
|
||||
package `in`.sminnovations.attendanceapp.screens.login.data
|
||||
|
||||
// File: AppModule.kt
|
||||
package `in`.sminnovations.attendanceapp.di
|
||||
|
||||
import android.content.Context
|
||||
import com.google.firebase.firestore.FirebaseFirestore
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import `in`.sminnovations.attendanceapp.screens.login.data.LoginDataStore
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
object AppModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideLoginDataStore(@ApplicationContext context: Context): LoginDataStore {
|
||||
return LoginDataStore(context)
|
||||
}
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideFirebase(): FirebaseFirestore {
|
||||
return FirebaseFirestore.getInstance()
|
||||
}
|
||||
|
||||
// fun provideFirebase(): FirebaseFirestore {
|
||||
// return FirebaseFirestore.getInstance()
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user