replacePage static method

Future replacePage(
  1. BuildContext context,
  2. Widget pageWidget, {
  3. bool fullscreenDialog = false,
})

跳转并替换当前页面

Implementation

static Future replacePage(BuildContext context, Widget pageWidget,
    {bool fullscreenDialog = false}) {
  return Navigator.pushReplacement(
      context,
      MaterialPageRoute(
          builder: (context) => pageWidget,
          fullscreenDialog: fullscreenDialog));
}