-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Internal: b/242216228
Use case
According to this page, we should get our apps ready for the new predictive back gesture that will be introduced in Android 13.
However, with just a few weeks to go before the final release, I haven't seen any info on how this will be handled in Flutter apps?
I have tried the simple trick of just adding android:enableOnBackInvokedCallback="true" to my Android Manifest, which does indeed activate the new animation on my Pixel 4 running the Android 13 beta. However, because all the back gestures are now captured by the system rather than Flutter, it completely breaks Flutter's navigation system, as ALL back gestures will now send you back to your phone's home screen, rather than taking you one level up Flutter's navigation tree when appropriate.
Proposal
I'm merely asking for information here, as I've searched extensively but couldn't find anything pertaining Flutter.
Will we have to do anything to adapt our apps? Or will the Flutter team implement this at some point at framework level? If it's the latter, when can we expect this to be added? Android 13 is right around the corner.
I'm assuming this should be handled at framework level, so that Flutter automatically implements this animation when navigating inside's Flutter's own tree, and hands it over to the system when the user is already at the root of the navigation stack (so they can correctly peek at their home screen before completing the gesture).
Eager to get some info on this!