kalismeras61 / flutter_page_transition

This is Flutter Page Transition Package
BSD 2-Clause "Simplified" License
471 stars 56 forks source link

Wrong page transition effect when changing direction e.g. from topToBottom to bottomToTop. #36

Open robertflesch opened 3 years ago

robertflesch commented 3 years ago

If I do a number of topToBottom transitions, everything works great, but when I switch to bottomToTop, the page that is being left moves in the wrong direction. It moves as if I was doing another topToBottom. Unfortunately this is a critical feature for my team. This effect is true for the leftToRight and the rightToLeft.

valentinoguerra commented 3 years ago

Same problem here

robertflesch commented 3 years ago

It looks like the secondaryAnimation is not being created the first time the transition is called. But I have no clue as to why. Any help from @kalismeras61 on this one?

When I add print statements in, I see this for the first time I call it. Logging animation, curve, and secondaryAnimation (▶ 0.056; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (▶ 0.083; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (▶ 0.111; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation ... (▶ 0.917; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (▶ 0.944; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (▶ 0.972; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (▶ 1.000; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation

the second time I run it (when it works ) the log looks like this You can see the second screen transitioning on this one, the first time it appears to use a default animation? Question is how to you get the animation to run on the departing screen the first time?

(⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation I/flutter (17162): topToBottom animation: kAlwaysCompleteAnimation➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation (⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: AnimationController#927f4(▶ 0.000; for PageTransition)➩ProxyAnimation➩ProxyAnimation (▶ 0.056; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: AnimationController#927f4(▶ 0.056; for PageTransition)➩ProxyAnimation➩ProxyAnimation (⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: AnimationController#927f4(▶ 0.083; for PageTransition)➩ProxyAnimation➩ProxyAnimation (▶ 0.083; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation ... (▶ 0.889; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: AnimationController#927f4(▶ 0.917; for PageTransition)➩ProxyAnimation➩ProxyAnimation (▶ 0.917; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: AnimationController#927f4(▶ 0.944; for PageTransition)➩ProxyAnimation➩ProxyAnimation (▶ 0.944; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: AnimationController#927f4(▶ 0.972; for PageTransition)➩ProxyAnimation➩ProxyAnimation (▶ 0.972; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation (⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: AnimationController#927f4(⏭ 1.000; paused; for PageTransition)➩ProxyAnimation➩ProxyAnimation (⏭ 1.000; paused; for PageTransition)➩ProxyAnimation curve:_Linear secondaryanimaition: kAlwaysDismissedAnimation➩ProxyAnimation➩ProxyAnimation

kalismeras61 commented 3 years ago

@robertflesch i add fix for that. Can you test with version 1.1.7+6

robertflesch commented 3 years ago

Hi Yasin Ilhan Thanks for responding and putting in a fix. My team was giving me a very hard time with this bug.

So the fix eliminates the problem with the black screen. But it also kills the nice two screens working as one transition. The second screen just sits there and the new screen comes over it. Better than the black screen, but not as nice as the two screens moving together when it works.

thanks again for the fix bob

On Wed, Jan 13, 2021 at 2:37 AM Yasin ilhan notifications@github.com wrote:

@robertflesch https://github.com/robertflesch i add fix for that. Can you test with version 1.1.7+6

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kalismeras61/flutter_page_transition/issues/36#issuecomment-759265412, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJBUMQIA7TNNXKVKCDO2RTSZVETVANCNFSM4U6TSDMQ .

samry commented 3 years ago

Hi there - still having this issue, anyone find a work around?