pushRoute<T extends Object?> method
Push the given route onto the navigator.
Implementation
Future<void> pushRoute<T extends Object?>(
Route<T> route, {
bool dismissKeyboard = true,
bool avoidDuplicateRoute = true,
}) async {
if (dismissKeyboard) this.dismissKeyboard();
if (avoidDuplicateRoute && route.isCurrent) {
debugPrint(
'INFO: New route is not pushed because it is already the current route!');
} else {
await Navigator.of(this).push<T>(route);
}
}