pushNewScreen<T> static method
Future<T?>
pushNewScreen<T>(
- BuildContext context, {
- required Widget screen,
- PageTransitionAnimation pageTransitionAnimation = PageTransitionAnimation.cupertino,
- PageRoute<
T> ? customPageRoute,
Once you push a screen with withNavBar
set to false
, Navigation bar cannot appear in screens pushed from here forward unless you define a new PersistentTabView
on those screens.
Implementation
static Future<T?> pushNewScreen<T>(
final BuildContext context, {
required final Widget screen,
bool? withNavBar,
final PageTransitionAnimation pageTransitionAnimation =
PageTransitionAnimation.cupertino,
final PageRoute<T>? customPageRoute,
}) {
withNavBar ??= true;
return Navigator.of(context, rootNavigator: !withNavBar).push<T>(
customPageRoute ??
(_getPageRoute(pageTransitionAnimation, enterPage: screen)
as Route<T>));
}