Animation when router.goback() triggered


I want to show exiting animation when router.goback() or back button pressed exactly reversal with entering animation.

and when I pressed back button, it works but run on background of next page.

my explanation might be strange so here’s vid

you can see when I clicked card from first screen, next page shows up from bottom.

and when I pressed back button, it goes down but on back of first page.

I want to show it until its out of screen. what should I do?

ps, there is so many routings in second page I can’t simply give fixed ZOffset in page.

Hi may_P,

it’s hard to tell exactly what causes the second page to go in background without seeing any code. It is definitely possible to make a page slide up and down, just as you want it to be, using Transitions.

For a comprehensive example on transitions, take a look at this:

I suggest you first create a smaller working example and then see how that differs from what you have in your larger application. Also, if you manage to create a small reproduction that exhibits the problem, please post some code here so we could give it a spin and help you solve it.

Transition, that was the answer!

thnaks again Uldis

I combined Transition and ZOffset and get what I want.