faob-dev / folding_cell

Flutter FoldingCell widget
MIT License
564 stars 40 forks source link

Card unfold state is not kept in a ListView #7

Closed livotov closed 5 years ago

livotov commented 5 years ago

In a ListView, if I'll unfold one item and then scroll far down and then back - item state is lost and the card becomes folded again. Is there any way to fix this?

Otherwise - great plugin!

faob-dev commented 5 years ago

yes Listview only creates objects that are visible and destroys all others you have to store cell fold bool state in your model object and there is unfoldCell property you can set that to your model property

faob-dev commented 5 years ago

I can create demo for you if you want?

livotov commented 5 years ago

Thanks, got it. No demo needed .