caduandrade / multi_split_view

Provides horizontal or vertical multiple split view for Flutter.
MIT License
152 stars 29 forks source link

Use children's keys to preserve state when children are added/removed. #26

Closed LiLoGandalph closed 2 years ago

LiLoGandalph commented 2 years ago

Children are wrapped inside other widgets, so they lose state when new ones are added or old ones are removed. It does not happen, when children are added to/removed from the end of the list. That's why I have updated the example to show the problem more clearly. Using child's key in root wrapping widget (Positioned, in this case) solves the problem and does not seem to cause any new ones.

caduandrade commented 2 years ago

Thank you @LiLoGandalph !

LiLoGandalph commented 2 years ago

You're welcome. When will you release the update on Pub? Really need it to use in a project.

caduandrade commented 2 years ago

You're welcome. When will you release the update on Pub? Really need it to use in a project.

Already did :wink: . Version 2.0.1. Thank you.

LiLoGandalph commented 2 years ago

Thank you for the great package!