Last active
May 10, 2022 14:28
-
-
Save Raiden18/ad207e231587ce15332e64bf38ad885b to your computer and use it in GitHub Desktop.
Information Expert. 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
class CartViewModel( | |
private val cartInteractor: CartInteractor | |
): ViewModel() { | |
private val approximatePriceOfProductsLiveData = MutableLiveData<String>() | |
init { | |
val cart = cartInteractor.getCart() | |
val approximatePriceOfProducts : BigDecimal = TODO("Must be calculated") | |
val approximatePriceOfProductsLiveData = approximatePriceOfProducts.toString() | |
} | |
fun getApproximatePriceOfProductsLiveData(): LiveData<String> { | |
return approximatePriceOfProductsLiveData | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment