fmvvm icon indicating copy to clipboard operation
fmvvm copied to clipboard

Using amimation for MaterialPageRoute

Open pishguy opened this issue 6 years ago • 3 comments

i think we can't use animation for MaterialPageRoute to use transitions, for example like with android

please see this link which that implemented on Flutter

https://github.com/divyanshub024/Flutter-page-route-transition

now my question is how can i use this library to make transitions?

pishguy avatar Jun 07 '19 08:06 pishguy

@MahdiPishguy This is why you can create your own implementation of the navigaitonservice and use that. In your custom implementation of the navigationservice you could use that library or really do anything else you wanted.

Let me know if you need any help telling the framework to use a custom implementation of the navigationservice.

Bowman74 avatar Jun 07 '19 14:06 Bowman74

@Bowman74 thanks, could you take a sample how can i implementing this feature?

pishguy avatar Jun 07 '19 15:06 pishguy

@MahdiPishguy Guess its a bit late now, but while buildRoute returns MaterialPageRoute, getRoutes returns just a Route, so you can write your own ie buildAnimatedRoute which can return an extended PageRouteBuilder, like in that blog.

SzunTibor avatar Feb 23 '20 14:02 SzunTibor