push<T> static method
Implementation
static Future<T?> push<T>(Widget page, {String? routeName}) {
return Navigator.of(currentContext!).push<T>(
MaterialPageRoute(
builder: (context) => page,
settings: routeName != null ? RouteSettings(name: routeName) : null,
),
);
}