AppModule

@Module
object AppModule

Dagger Hilt module responsible for providing singleton instances used throughout the application.

This module is annotated with Module and is installed in SingletonComponent. It contains methods annotated with Provides to create and configure singleton instances required for dependency injection using Dagger Hilt. These singletons play a crucial role in various aspects of the StudyPlanet application.

Functions

Link copied to clipboard
@Provides
@Singleton
fun okhttpClient(): OkHttpClient

Provides an instance of OkHttpClient configured with an authentication interceptor.

Link copied to clipboard

Provides an instance of LoginUseCase using the specified StudyPlanetRepository.

Link copied to clipboard
@Singleton
@Provides
fun providePlanetDao(db: StudyPlanetDatabase): PlanetDao
Link copied to clipboard

Provides an instance of RegisterUseCase using the specified StudyPlanetRepository.

Link copied to clipboard
@Provides
@Singleton
fun provideStudyPlanetApi(): StudyPlanetApi

Provides an instance of StudyPlanetApi using Retrofit.

Link copied to clipboard
Link copied to clipboard
@Provides
@Singleton
fun provideStudyPlanetRepository(api: StudyPlanetApi, userDao: UserDao, planetDao: PlanetDao): StudyPlanetRepository

Provides an instance of StudyPlanetRepository using the specified dependencies.

Link copied to clipboard
@Singleton
@Provides
fun provideUserDao(db: StudyPlanetDatabase): UserDao
Link copied to clipboard
@Provides
@Singleton
fun provideValidators(): Validators