-
-
Save skydoves/060f4ecda09974918b2c45abf51fe0ce to your computer and use it in GitHub Desktop.
DetailsViewModel
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 PokedexDetails( | |
// SavedStateHandle with the argument "pokemon" will be injected | |
detailsViewModel: DetailsViewModel = hiltViewModel(), | |
) { | |
.. | |
} | |
@HiltViewModel | |
class DetailsViewModel @Inject constructor( | |
savedStateHandle: SavedStateHandle, | |
) : ViewModel() { | |
.. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment