79090609

Date: 2024-10-15 15:20:00
Score: 0.5
Natty:
Report link

You can write a function to pop every route, and push a new one when it's empty, something likw this:

void clearAndNavigate(String path) {
  while (getGoRouter().canPop() == true) {
  getGoRouter().pop();
}
  getGoRouter().pushReplacement(path);
}

getGoRouter is an instance of GoRouter

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Chaibedraa Ibrahim