You can get the route name using the below code
GoRouter.of(context).state.name
For Route path
GoRouter.of(context).state.path