Last active
October 27, 2022 05:02
-
-
Save Morfly/d9d2724ab5c9d1fdd040e55c217f1469 to your computer and use it in GitHub Desktop.
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
interface DataProvider { ... } | |
val LocalDataProvider = compositionLocalOf<DataProvider> { | |
error("No data provider found!") | |
} |
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
val dataProvider = LocalDataProvider.current | |
val viewModel = injectedViewModel { | |
DaggerMovieSearchComponent.builder() | |
.dataProvider(dataProvider) | |
.build() | |
.viewModel | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment