I am using WillPopScope and to navigate I am using Navigator.pushNamed(), so that onWillPop is not working fine, if I remove pushNamed and add pushAndRemoveUntil and make route false it works. But, I do not need like that I need to use pushNamed. How can I achieve this.
Asked
Active
Viewed 240 times
1 Answers
0
Try the below code :
onWillPop: () async {
Navigator.pushNamed();
return false;
},

Rahul Variya
- 1,257
- 1
- 6
- 15