navigateTo method
Key binded to material app, allow this class to control the app navigation in any moment of context
Implementation
Future<dynamic> navigateTo(String route,
{Map<String, dynamic>? queryParams, int removeUntil = -1}) {
/// Method used to navigate with named routes and query params
String routeName = generateNavRoute(route, queryParams: queryParams);
if (removeUntil > 0) {
return navigatorKey.currentState!.pushReplacementNamed(routeName);
} else {
return navigatorKey.currentState!.pushNamed(routeName);
}
}