I have 3 Choice chips with the names "Male" "Female" and "Non-binary" which can be multiple selected. I also have a local variable Gender List<String> which is set with the values selected on the chips, so it serves as a genders filter for my users query. The problem is that for example in my Chips i display "Non-binary" and I need to put into my local variable "NonBinary" because thats the name on the database. Also if i make a translation for the app I still want to put specific names on the variables and not just the displayed name off the chips. How can I do this??
Same for the other fields, I have Yes and No on the chips but I want to add "true" or "false" to my variable List<bool>.
Add different ChoiceChips values to App State
Widgets & Design
Ive tried custom action but doesnt work in case of translation and needs many many conditionals to match all of the combinations possible on the chips
No
4 replies