SchabanBo / qlevar_router

Manage you project Routes. Create nested routes. Simply navigation without context to your pages. Change only one sub widget in your page when navigating to new route.
MIT License
87 stars 22 forks source link

Page transition only works the first time #110

Closed gabriel-gheorghe closed 1 year ago

gabriel-gheorghe commented 1 year ago

I am inside a QRoute.withChild() widget. First time I switch to a child the transition effect takes place. The second time I switch to the same child, the transition effect doesn't do anything.

SchabanBo commented 1 year ago

Hi @doublegarts, Can you provide a sample code? I tested it and it works

https://user-images.githubusercontent.com/49782771/223481235-b594d478-a8de-4a70-a01b-5831bdebdb1c.mp4

gabriel-gheorghe commented 1 year ago

https://qlevar-router.netlify.app/#/dashboard/products I used the code as it is here. On the official example you can see the issue.

SchabanBo commented 1 year ago

In this case where we are saving the state of the page, we are not removing the page from stack, we are just pushing it back, the page still exists. So when you are switching back to it, it will not animate because flutter does not create it again, and the transition animation is only occurred with creating the page But yes, maybe I should add some kind of animation when switching. I don't know if this is possible. I will look into it soon. Or if you have any info or reference that could help will be great.