The problem was that I had wrapped MyApp with GetMaterialApp, in which case the solution was to set Get.key as the value of navigatorKey in GoRouter().