I need to leave the current screen and navigate back to the second to last screen.
void leaveStatefulWidget3(){
Navigator.pop(context);
}
// StatefulWidget 2...
// StatefulWidget 3 {....}
// the current one (where the navigator is now)
My app has navigated from the first screen to 2, and then to 3.
I need to leave or Navigator.pop(context) the StatefulWidget 3 to stateFull 1.
NOTE : I have complete access to my leaveStatefulWidget3() method from StatefulWidget 3, but don't know how to specify the route to use Navigator.pop(context) in leaveStatefulWidget3().
When I use Navigator.pop(context) directly from the first widget it leaves stateFull 1.