You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a kinda large flutter app, and we're using vrouter as our routing solution. So far it served us well, but we're now encountering some issues when it comes to implementing our custom transitions.
The design asks for a transition where the old page (or subpage, as we also use VNester) is animated as well as the new page.
For example, one of our transitions works as follows:
old content is faded out, until the (portion of) the screen becomes white (opacity 1 to 0)
new content is faded in (opacity 0 to 1)
Another transition we want to implement switches the old content with the new content with some sort of sliding transition: the old content slides left disappearing from the screen, the new content appears from the right as if they were placed side by side.
This looks like the rightToLeftJoined transition in the page_transition package: https://youtu.be/q-e5t3qnB_M?t=58
I've been able to implement 1 using a FadeTransition with a VWidgetGuard child in the VNester.widgetBuilder definition, and interacting with the animation controller in the beforeLeave and afterEnter functions in VWidgetGuard.
Ideally, I'd prefer using the buildTransition attribute of VNester/VRouter to specify the transitions, but I do not have access to the previous value of body.
Is there a cleaner way to implement these transitions, or would you consider passing the previous value of body to the buildTransition method?
The text was updated successfully, but these errors were encountered:
I'm working on a kinda large flutter app, and we're using
vrouter
as our routing solution. So far it served us well, but we're now encountering some issues when it comes to implementing our custom transitions.The design asks for a transition where the old page (or subpage, as we also use
VNester
) is animated as well as the new page.For example, one of our transitions works as follows:
Another transition we want to implement switches the old content with the new content with some sort of sliding transition: the old content slides left disappearing from the screen, the new content appears from the right as if they were placed side by side.
This looks like the
rightToLeftJoined
transition in thepage_transition
package: https://youtu.be/q-e5t3qnB_M?t=58I've been able to implement 1 using a
FadeTransition
with aVWidgetGuard
child in theVNester.widgetBuilder
definition, and interacting with the animation controller in thebeforeLeave
andafterEnter
functions inVWidgetGuard
.Ideally, I'd prefer using the
buildTransition
attribute ofVNester
/VRouter
to specify the transitions, but I do not have access to the previous value ofbody
.Is there a cleaner way to implement these transitions, or would you consider passing the previous value of body to the
buildTransition
method?The text was updated successfully, but these errors were encountered: