Created
August 12, 2021 15:08
-
-
Save barbeau/cdf271764647a7f9de909d8cb13c393b to your computer and use it in GitHub Desktop.
Flow - lighweight architecture article - Data Module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Configuration for DI on the repository and shared location manager | |
*/ | |
@Module | |
@InstallIn(SingletonComponent::class) | |
object DataModule { | |
@Provides | |
@Singleton | |
fun provideSharedLocationManager( | |
@ApplicationContext context: Context | |
): SharedLocationManager = | |
SharedLocationManager(context, (context.applicationContext as LocationApplication).applicationScope) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment