buildAnimatedPage method
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
@override
Page<dynamic> buildAnimatedPage(BuildContext context) {
return ModalBottomSheetPage<dynamic>(
key: key,
name: screenName,
child: RootPopScope(child: builder(context)),
isDismissible: isDismissible,
enableDrag: enableDrag,
isScrollControlled: isScrollControlled,
);
}