to<T extends Object?> method
Find the page with given routeName and add it to the route stack and trigger route transition.
If the page belongs to a sub route the page is added to it and only this particular sub route is triggered to animate transition.
It is similar to _navigate.toNamed
method.
Implementation
Future<T?> to<T extends Object?>(
String routeName, {
Object? arguments,
Map<String, String>? queryParams,
bool fullscreenDialog = false,
bool maintainState = true,
Widget Function(Widget route)? builder,
Widget Function(
BuildContext context,
Animation<double> animation,
Animation<double> secondAnimation,
Widget child,
)? transitionsBuilder,
}) {
return _navigationBuilder.to<T>(
routeName,
arguments: arguments,
queryParams: queryParams,
builder: builder,
fullscreenDialog: fullscreenDialog,
maintainState: maintainState,
transitionsBuilder: transitionsBuilder,
);
}