Questions tagged [mutablestateof]

33 questions
0
votes
1 answer

Mutablestateof - State hoisting

What to do to manage one state in two functions? (openDialog) How to transfer openDialog state from ProductDialog() to AppBar()? I know I can make a separate class per state but I don't want to. @Composable fun ProductDialog() { val openDialog =…
Krystian
  • 3
  • 1
0
votes
1 answer

What is the proper way to update TextField string value after successfully loading data to pre-fill the TextField from database?

I am using Jetpack Compose, and it has occurred to me that I may be doing this incorrectly. Suppose we have a screen that allows us to edit a form's data, which has been saved locally using Room. Currently, I follow this rough outline: In my…
0
votes
0 answers

MutableState value not getting updated in Observer block

I have a live data that I am observing in my fragment, in which I have to act on the result received from LiveData and update my MutableState which is used in a composable. I am not able to figure out why the MutableState value is not getting…
Ali_Waris
  • 1,944
  • 2
  • 28
  • 46
1 2
3