Open justinmc opened 4 months ago
As of https://github.com/flutter/engine/pull/52302, predictive back works in Android add-to-app everywhere except within Flutter routes (predictive back route transitions was added in https://github.com/flutter/flutter/pull/141373). Add-to-app should support predictive back route transitions too.
Support route transitions in FlutterFragment. This would be similar to how it was added for FlutterActivity in https://github.com/flutter/engine/pull/49093, but in FlutterFragment like https://github.com/flutter/engine/pull/52302, which added basic predictive back support there.
Predictive back route transitions within Flutter look like this:
https://github.com/flutter/flutter/assets/8436039/96b6dc20-89c9-45db-b8b4-aec7e996477b
Run an add-to-app Flutter app where the Flutter part has multiple routes, like this: https://github.com/justinmc/flutter-add-to-app
Perform a back gesture to go from one Flutter route to another. You should be able to peek at the previous route and cancel the gesture, but instead you just get the typical ZoomPageTransition.
The triaged-android label is irrelevant if there is no team-android label or fyi-android label.
triaged-android
team-android
fyi-android
Use case
As of https://github.com/flutter/engine/pull/52302, predictive back works in Android add-to-app everywhere except within Flutter routes (predictive back route transitions was added in https://github.com/flutter/flutter/pull/141373). Add-to-app should support predictive back route transitions too.
Proposal
Support route transitions in FlutterFragment. This would be similar to how it was added for FlutterActivity in https://github.com/flutter/engine/pull/49093, but in FlutterFragment like https://github.com/flutter/engine/pull/52302, which added basic predictive back support there.
Predictive back route transitions within Flutter look like this:
https://github.com/flutter/flutter/assets/8436039/96b6dc20-89c9-45db-b8b4-aec7e996477b
How to reproduce
Run an add-to-app Flutter app where the Flutter part has multiple routes, like this: https://github.com/justinmc/flutter-add-to-app
Perform a back gesture to go from one Flutter route to another. You should be able to peek at the previous route and cancel the gesture, but instead you just get the typical ZoomPageTransition.