Guys help me please.
By clicking on the checkboxes the color changes as expected. But every time I leave the app or switch screens and come back, the color stays the original color. That is, the color of when I clicked does not remain.
I thank in advance to those who help me
Generally, to store information permanently, we use a database.
Check It And your logic.
Yes. I am using TinyDB.
Can I store colors in TinyDB?
Check your logic…
Where does it store?
When do you store?
When does the previous color change?
When do you use the stored color?
But in the blocks above, it shows what I’m storing when clicked or not on TinyDB. Was to save
Well it looks like it’s working now.
I just removed that block and everything worked as expected.
Saw ? It is a matter of analyzing your algorithm. Check if removing this block will cause any other problems.
@Rogerio_Rios Thanks for the tip.
I already took a look here and everything works perfectly.
I can’t understand what are you trying to code as it is in a different language but I think you have 2 colours and you want them to change with the click of a checkbox and you also want to store the value of colour so that it remains same. To do this you can use a tiny DB component…
when screen init…
If TinyDB get value = color1
then set colour to your colour
else another colour…