aryzhov / flutter-expandable

A Flutter widget that can be expanded or collapsed by the user.
MIT License
398 stars 114 forks source link

ListView Expanding All Child Items #128

Open Kranthi94 opened 6 months ago

Kranthi94 commented 6 months ago

Hi,

I integrated expandable with a list view. Below is the widget tree.

ExpandableNotifier ---> ListView ---> ListViewItem ---> ScrollOnExpand ---> ExpandablePanel (expandableController)

Issue is that when we are expanding one of the items in the list is expanding all the items in the list.

fxgonzalez5 commented 2 months ago

You are using a single controller for all elements, you must create a controller for each one. The fastest option is to use a Builder and inside it create a controller for each element.