How to pop context with FLUTTER go_router?

How do I go back to the previous screen with flutter’s go_router? How to pop context? Currently I am simply adding a new screen to the stack whether I want to go back or go forward. onTap: (() => context.go("/secondPage")) I have used context.pop() but it throws error saying – _AssertionError (‘package:go_router/src/matching.dart’: Failed assertion: line… Read More How to pop context with FLUTTER go_router?