replace static method
Implementation
static void replace(BuildContext context, Widget page) {
Navigator.of(context).pushReplacement(
new MaterialPageRoute(builder: (context) => page),
);
}
static void replace(BuildContext context, Widget page) {
Navigator.of(context).pushReplacement(
new MaterialPageRoute(builder: (context) => page),
);
}