flutterdartnavigationmaterialpageroute

Flutter/Dart - Navigator.pop(context) - How to Pop two Contexts back?


I've got;

SwipeGestureRecognizer which calls;

Navigator.push (context,
                  PageTransition(
                    type: PageTransitionType.downToUp,
                    child: HomeReply(),
                  ));

How do I get the Navigator to pop back to Home()?


Solution

  • Turns out HomeReply() had an extra MaterialApp in the build. Once I removed this it all worked as normal with Navigator.pop(context);.