diff --git a/game_template/lib/main.dart b/game_template/lib/main.dart index 1e15893c0..57f3cfbe3 100644 --- a/game_template/lib/main.dart +++ b/game_template/lib/main.dart @@ -142,7 +142,8 @@ class MyApp extends StatelessWidget { GoRoute( path: 'session/:level', pageBuilder: (context, state) { - final levelNumber = int.parse(state.params['level']!); + final levelNumber = + int.parse(state.pathParameters['level']!); final level = gameLevels .singleWhere((e) => e.number == levelNumber); return buildMyTransition( diff --git a/game_template/pubspec.yaml b/game_template/pubspec.yaml index 31e655dc1..d15245830 100644 --- a/game_template/pubspec.yaml +++ b/game_template/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: audioplayers: ^4.0.0 cupertino_icons: ^1.0.2 - go_router: ^6.0.1 + go_router: ^7.0.0 logging: ^1.1.0 provider: ^6.0.2 shared_preferences: ^2.0.13