buildAnimatedPage method

Page buildAnimatedPage(
  1. BuildContext context
)

Built-in page types wrap their content so a root page keeps system back (Android predictive back). Custom subclasses that override this, including types returned from ReplaceAnimationTypeCustom.handler, do not get that wrap, and on Android 16 back on such a root closes the app.

Implementation

Page<dynamic> buildAnimatedPage(BuildContext context) {
  return MaterialPage<dynamic>(
    key: key,
    name: screenName,
    child: RootPopScope(child: builder(context)),
  );
}