Stuck "MutableHomeState" in HomeViewModel #29
-
Thank you for this wonderful project of yours. But I have a question! I don't know what "MutableHomeState" in HomeViewModel is, I tried looking for it, but I can't see it in your project. Can you help me and explain where "MutableHomeState" is. Thank you very much @PatilShreyas |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @dangnghia2101, You can see this file Also, you'll notice that the interface is annotated with I hope this clears the doubt. Let me know for more queries. |
Beta Was this translation helpful? Give feedback.
Hi @dangnghia2101, You can see this file
https://github.com/PatilShreyas/Foodium-KMM/blob/main/shared/src/commonMain/kotlin/ui/screen/home/HomeState.kt
Also, you'll notice that the interface is annotated with
@GenerateMutableModel
. This is a part of Mutekt processor which generates a mutable model for easy modification of values. SoMutableHomeState
is generated at the time of building project which will have all the parameters as mutable (var
) which are there defined in the interface.I hope this clears the doubt. Let me know for more queries.