直接上代码
Navigator.of(context).push( MaterialPageRoute(
settings: RouteSettings(name: "/routeName"),
builder: (context) => YourPage(参数 可为空),
),
);
这里是返回的代码
Navigator.of(context).popUntil(ModalRoute.withName("/routeName"));
网友评论