Created
March 19, 2019 11:07
-
-
Save Nimrodda/86ad3e42bebef830ff552e853f43ee9d 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 DetailViewModel( | |
private val handle: SavedStateHandle | |
) : ViewModel() { | |
fun loadData() { | |
val id = handle["id"] ?: "default" | |
// Load data for ID... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment