-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Android predictive back route transitions #131961
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Is there an existing issue for this?
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
Spec animation
predictive-back-video-1-calendar-event-example.mp4