pushNamedTransition<T> method
Implementation
Future<T?> pushNamedTransition<T>({
required String routeName,
required PageTransitionType type,
Object? arguments,
Duration duration = const Duration(milliseconds: 200),
Curve curve = Curves.linear,
bool fullscreenDialog = false,
bool opaque = false,
}) {
return Navigator.push<T>(
this,
PageTransition(
settings: RouteSettings(name: routeName, arguments: arguments),
type: type,
childBuilder: (context) {
final route = Navigator.of(context).widget.onGenerateRoute?.call(
RouteSettings(name: routeName, arguments: arguments),
) as PageRoute;
return route.buildPage(
context,
AlwaysStoppedAnimation(1.0),
AlwaysStoppedAnimation(0.0),
);
},
duration: duration,
curve: curve,
fullscreenDialog: fullscreenDialog,
opaque: opaque,
),
);
}