📜  导航到新屏幕并返回 - Flutter - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:43.140000             🧑  作者: Mango

代码示例3
Navigator.pushReplacement(
  context,
  MaterialPageRoute(builder: (context) => MainPage()),
  (Route route) => false,
);