push<T> static method
Future
push<T>(
- BuildContext context,
- Widget page, {
- bool fullscreenDialog = false,
- RouteSettings? settings,
- String? name,
short handed push navigator
name
parameter can be use instead of settings
if you only need to provider name
Implementation
static Future push<T>(
BuildContext context,
Widget page, {
bool fullscreenDialog = false,
RouteSettings? settings,
String? name,
}) async {
return await Navigator.of(context).push<T>(
MaterialPageRoute(
builder: (context) => page,
fullscreenDialog: fullscreenDialog,
settings: name != null ? RouteSettings(name: name) : settings,
),
);
}