Created
May 26, 2021 01:43
-
-
Save ChristopherME/c9b9603461fdfc693e8309872c8b3ad5 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
@HiltViewModel | |
class ProductDetailViewModel @Inject constructor( | |
private val savedStateHandle: SavedStateHandle, | |
... | |
) : ViewModel() { | |
... | |
private fun getProductFromArgs(): ProductDetailArgs { | |
return ProductDetailArgs( | |
productId = savedStateHandle.get("productId")?:"", | |
productParentId = savedStateHandle.get("productParentId") | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment