hi,
I need help because I’m going a little crazy.
I want to put the background colour of a dynamic horizontal arrangement with values of a list (lista_colores).
Did you notice, you are using hex to int converter and passing a color code string which is of length 8. It must be length of 6 to correctly parse the hex color and convert it to integer.
Just remove the last 2 characters from hex color string. For eg. #FFEC7163 to #FFEC71
I’m sorry @Boban, I thought that you wanted to see the results of the list colores.
I have the colors in the firebase realtime database,
I use the block Firebase Data Changed , extracting the data of color with get values key path, and storing the data of colors in global lista colores. I marked it with red color lines.
And finally, I use this list in create dynamic components.
I think the problem is when loading data changed but I do not know the solution now.
If I change any data in firebase then the error doesn’t appear. But, if I use “Refresh companion Screen” then the error is produced: “Unknow color”.
Okay, thanks @The_K_Studio, in the firebase I have two types of data, some that change and others that are fixed (setting: list of colors, numbers of parties, etc.). So, I can use Got Values and Data Changed methods simultaneously??? Or, if one I can’t use the other?
In the first case, I would use Got Values for setting variables and changed methods for changing data. Do you know some examples of this?
You can use both there is no issue but data changed blocks is triggered all the time when there is change in data at firebase . So if you want to get color list only when screen loaded first time then use other blocks.