Coder Social home page Coder Social logo

Possible bug? about animated_tree_view HOT 6 OPEN

busslina avatar busslina commented on September 27, 2024
Possible bug?

from animated_tree_view.

Comments (6)

jawwad-hassan89 avatar jawwad-hassan89 commented on September 27, 2024

Is this related to this PR-28?
I will look into this.

from animated_tree_view.

busslina avatar busslina commented on September 27, 2024

Is this related to this PR-28? I will look into this.

Not really. The thing here is that when I switch tabs, state get disposed. When re-enter on the tree tab I tried to reuse the Tree object. The root node is okay (gets reset to collapsed, but the remaining nodes that were previously get expanded, now are collapsed but its state say are expanded (you can see the ChevronIndicator), so I must click twice on it to get well expanded.

I bypass this bug(?) by creating my own paralel Tree which save the expanded state and the children values. So when I re-enter on the Tree tab, I create a new Tree (your Tree) and re-install the state saved on my tree.

from animated_tree_view.

StoneColdRepins avatar StoneColdRepins commented on September 27, 2024

@busslina can you elaborate on your solution to bypass the bug(?) or post a code sippet

from animated_tree_view.

busslina avatar busslina commented on September 27, 2024

I just simply have a parallel tree in which I save the state. When I revisit this tab, I recreate the node states based on this parallel tree.

Seems that your node implementation is not prepared for a scenario where the page/container gets disposed and rebuilt again. They save the expanded state. But when they get recreated, they are not expanded but still have the expanded state.

I could pass my code, but it is just a patch. I recommend you to review your code and when the tree is re/build check the nodes and expand them if they are marked as exoanded

from animated_tree_view.

StoneColdRepins avatar StoneColdRepins commented on September 27, 2024

hi please send the patch, i am new to flutter and using the control in my app

from animated_tree_view.

busslina avatar busslina commented on September 27, 2024

hi please send the patch, i am new to flutter and using the control in my app

https://gist.github.com/busslina/e60a41ceca418151c491a730f12a57b0

If you want help to understand my code, ask me in the Gist

from animated_tree_view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.