replacePage static method
跳转并替换当前页面
Implementation
static Future replacePage(BuildContext context, Widget pageWidget,
{bool fullscreenDialog = false}) {
return Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => pageWidget,
fullscreenDialog: fullscreenDialog));
}