Kaito Asano
 · Japanese IT entrepreneur

I want to change the color of selected content only.

I have a StaggeredView with a list of Containers inside, but when I select one, I want only the selected one to change color to pink, but everything is changing. I understand the reason for this: the Container colors are centrally managed in a Page state called "selectedColor", so if I update the Page state color when I select one, everything will change.

I would like to know if there is a way to have the individual colors change using this approach, or if there is a completely different method.

1
10 replies