Hey,
I am trying to display the current delivery adress on the adresses page via an icon.
I am storing the multiple adresses of a user as a subcollection with multiple strings(street, house number etc.)
My current approach is to store the current delivery adress as an app state with a data type consisting of adressRef and boolean isAdress(I want to use this for the icon to show on or off).
This pretty much works how it should, but I can not get to work that only the current delivery adress from th AppState has a on icon.
A toggle Icon can not read the boolean field of a data type.
I need switch icon that can read the data type or an action that can set all other icons to false.
or I store the delivery adress in firebase as a boolean in the adress doc. But then I need an action that can set all other doc boolean fields in the collection to false.
On the database side this approach works though.
hope it is understandable.
thanks