-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incomplete expansion state when expanding too many nodes in AnimatedTreeView
#78
Comments
Hey @TENX-S I'm currently completely out of free time to work on this project, so I won't be able to look into this for quite a while. If you're willing to submit a PR I'll do my best to find time to review it. |
I have marked both your issues as bugs for now until I have time to look further into it. |
I just took a look at this and could reproduce locally. Upon further investigation I couldn't find out why this is happening, might me an issue with how scrollables handle states in Flutter, but I'm not sure. Unfortunatelly there's no quick fix for this from what I can tell. I might have to rewrite the SliverAnimatedTree logic to use a single AnimationController for the whole tree instead of one per animating node. |
Hey, sorry it took me so long to look further into this. I've rewritten (simplified a lot) the animation implementation. The new implementation is way more performant (with some trade-offs) and relies on You can try it out on the dev/animation-improvements branch by depending on it via git refs: dependencies:
flutter_fancy_tree_view:
git:
url: git@github.com:baumths/flutter_tree_view.git
ref: dev/animation-improvements Trade-offsThe new implementation has some quirks, e.g.:
Benefits of the new implementation:
Moving forwardI need some feedback about the new implementation before merging as I'm not sure if introducing such a breaking change should bump the major or minor package number. I don't think the As the new I'm going to let this sit as is for now while I work on another project and decide later. Any suggestions are very appreciated. |
I updated my pubspec.yaml as above to test out your branch in my project. Things didn't go well. I have a button in my app to expand all root nodes to two levels deep. The original problem was that the last node did not expand. With the branch the problem is that nodes which previously expanded now disappear. It's a shame that you cannot spend time on this because your library looks better than others I have tried. I may have to return to one of those. Thanks anyway. |
Could you provide a minimal reproducible example so I can take a look at the issue when I get some spare time? |
reproduction.mp4
I tweaked
examples/minimal.dart
a little bit to get minimal reproducible code:TreeView
does not have this problem even if you generate 5000 nodes ingetRoots()
(but expand all nodes will freeze the app)The text was updated successfully, but these errors were encountered: