Reland root predictive back (#132249)

Root predictive back (https://github.com/flutter/flutter/pull/120385) was reverted in https://github.com/flutter/flutter/pull/132167.  This PR is an attempt to reland it.

The reversion happened due to failed Google tests (b/295073110).
This commit is contained in:
Justin McCandless
2023-08-17 16:55:05 -07:00
committed by GitHub
parent ced3e76626
commit f68d03f1cd
36 changed files with 3225 additions and 298 deletions

View File

@@ -71,14 +71,10 @@ class _HomeState extends State<Home> with TickerProviderStateMixin<Home> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
return NavigatorPopHandler(
onPop: () {
final NavigatorState navigator = navigatorKeys[selectedIndex].currentState!;
if (!navigator.canPop()) {
return true;
}
navigator.pop();
return false;
},
child: Scaffold(
body: SafeArea(