diff --git a/lib/views/main_menu_view.dart b/lib/views/main_menu_view.dart index 6597a68..3a9441f 100644 --- a/lib/views/main_menu_view.dart +++ b/lib/views/main_menu_view.dart @@ -169,18 +169,19 @@ class _MainMenuViewState extends State { CupertinoIcons.person_2_fill), ], ), - onTap: () async { - //ignore: unused_local_variable - final val = await Navigator.push( + onTap: () { + final session = + gameManager.gameList[index]; + Navigator.push( context, CupertinoPageRoute( builder: (context) => ActiveGameView( - gameSession: gameManager - .gameList[index]), + gameSession: session), ), - ); - setState(() {}); + ).then((_) { + setState(() {}); + }); }, ), ),