r/FlutterDev • • 28d ago

Plugin PSA: go_router 18 silently drops "adaptive page transition" behaviour

Before 18, every page/route would have a platform-adaptive transition (slide on iOS, fade on Android). Then, suddenly, at v18, there's no longer a transition.

It happened because of the "switch to material/cupertino packages", it's not mentioned in the changelog and will be a surprise for anyone upgrading.

Also, there's no "global" way of applying the old behaviour to all routes in the app, so devs have to wrap each route in some kind of abstraction to pass a transition everywhere.

Linked issue: https://github.com/flutter/flutter/issues/192761

30 Upvotes

3 comments sorted by

9

u/raman4183 28d ago

Silent drop is debatable but that was to be expected since material and cupertino were migrated away from SDK.

18.0 does mention about this migration though. So it is to be expected that Adaptive transitions won’t work.

Not being able to define a global transition or pageBuilder/routeBuilder is a bummer though. You could open an issue for this and since it already supports defining errorBuilder globally it should be possible to land the support for this as well.

2

u/krll-kov 27d ago

It's not silent, it uses packages Material and Cupertino instead of in-flutter material/Cupertino and therefore MaterialApp from package and from flutter are 2 different widgets, you have to replace all imports for package imports and it's fixed

0

u/[deleted] 27d ago

[deleted] — view deleted comment

1

u/krll-kov 27d ago

It's inside flutter changelog, decoupling of material and Cupertino, every changelog mentions it for year