Need Help with Implementing Single Select Choice Chips in ListView for Product Details Page

Actions & Logic

Hello everyone,

I'm working on a product details page in my app where users can select the quantity of a product, which affects the price displayed. The quantities and prices are provided in an array of objects. I'm using a custom ChoiceChips widget within a ListView to present these options.

However, I'm facing a couple of issues:

  • The ChoiceChips are allowing multi-selection even though I have set them to single select mode.

  • I am unsure how to update and display the price corresponding to the selected quantity.

Additionally, I would like to set the first element of the array as the default selected option.

Could anyone help me resolve these issues or point me to relevant documentation or examples? Any advice on how to properly manage the state of selected items in ChoiceChips and display corresponding data would be greatly appreciated!

Thank you!

What have you tried so far?

Here's my current implementation:

  1. I created a custom ChoiceChips component that takes an array of names (quantities) as a parameter.

  2. I then used this component inside a ListView to dynamically generate children based on the array of quantities.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
11 replies