navigateTo<T> method
Pushes routeName
onto the navigation stack
id
is for when you are using nested navigation, as explained in documentation.
preventDuplicates
will prevent you from pushing a route that you already in, if you want to push anyway,
set to false.
Implementation
Future<T?>? navigateTo<T>(
String routeName, {
dynamic arguments,
int? id,
bool preventDuplicates = true,
Map<String, String>? parameters,
RouteTransitionsBuilder? transition,
}) {
return G.Get.toNamed<T?>(
routeName,
arguments: transition != null
? {'arguments': arguments, 'transition': transition}
: arguments,
id: id,
preventDuplicates: preventDuplicates,
parameters: parameters,
);
}