Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Use case
Flutter recently added support for Android's predictive back feature (#109513) in #120385 and flutter/engine#39208. However, that only works when exiting a Flutter app, and not between routes within a Flutter app.
Proposal
Flutter should support route transitions that allow the user to peek behind the current route while performing a back gesture and cancel the route pop if desired.
This can't be done entirely in the framework if we want to show Android's back arrow too. Flutter can't draw the back arrow with 100% accuracy because it is customizable by the system color theme, and the colors used for the arrow are not currently exposed via API.
We should be able to use the onBackAnimationCallback API to get information about the back gesture as it happens and update the route transition animation.

Requirements
- Route transitions should look like the spec (see video below).
- Canceling the gesture and committing the gesture should both work.
- The native back button should be shown during the gesture.
- The route transition should integrate well with Flutter's existing route transition infrastructure.
- Should be the default behavior for Android apps that enable predictive back? But should not interfere with other platforms and older versions of Android where the engine API isn't supported.
- Stretch goal: if possible, vertically dragging during the gesture should wiggle the animation vertically as it seems to do on native. This seems to require having Flutter track the gesture as well as native.