onPressed: () {
Navigator.pushNamedAndRemoveUntil(context, "homeRoute", (route) => route == null);
}
最后的函数也可以用(Route router) => false
https://www.jianshu.com/p/60bd3809efdc
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(
builder: (_) => DetailShow(topic: topic)),
ModalRoute.withName('/'));
栈堆积问题
题主是大佬 有很多可以学习的地方
https://juejin.im/post/5cb33ff6f265da03a1581d35#heading-7