Last active
October 27, 2022 05:03
-
-
Save Morfly/9416f20cfc71ae4af5dbc20a03f87b20 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
class MovieSearchEntryImpl @Inject constructor() : MovieSearchEntry() { | |
@Composable | |
override fun Composable(...) { | |
val dataProvider = LocalDataProvider.current | |
val viewModel = injectedViewModel { | |
DaggerMovieSearchComponent.builder() | |
.dataProvider(dataProvider) | |
.build() | |
.viewModel | |
} | |
MovieSearchScreen(viewModel, ...) | |
} | |
} |
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
import androidx.lifecycle.ViewModel | |
class MovieSearchViewModel @Inject constructor(...) : ViewModel() { ... } |
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
@Composable | |
fun MovieSearchScreen(viewModel: MovieSearchViewModel, ...) { ... } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment