It is quite simple. Just save the instance of the GoRouter in which you have defined your routes and use that instance to navigate.
final router = GoRouter(); router.push(location);