pushReplacement static method
Future
pushReplacement(
- BuildContext context,
- Widget page, {
- bool fullscreenDialog = false,
- RouteSettings? settings,
- String? name,
short handed push replacement navigator
Implementation
static Future pushReplacement(
BuildContext context,
Widget page, {
bool fullscreenDialog = false,
RouteSettings? settings,
String? name,
}) async {
return await Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (context) => page,
settings: name != null ? RouteSettings(name: name) : settings,
fullscreenDialog: fullscreenDialog,
),
);
}