We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If someone wins or draws, the game stops, but the timer works again. But the timer should not work either.
The text was updated successfully, but these errors were encountered:
Got the solution, Do some changes as below
add/update in below files
1) navigation_service
void navigateToFirst() { return Navigator.of(navigatorKey.currentContext!).popUntil((route) => route.isFirst); }
2)game_view_model
@action void quitGame(bool isDialog) { resetGame(); if(isDialog){ _navigationService.navigateToFirst(); } _navigationService.navigateTo(Routes.homeViewRoute); }
3) game_dialog_quit_button
@OverRide Widget build(BuildContext context) { return SizedBox( width: 126.w, height: 40.h, child: ElevatedButton( style: ButtonStyle( backgroundColor: MaterialStateProperty.all( red, ), elevation: MaterialStateProperty.all(0), shape: MaterialStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), ), onPressed: () { _gameViewModel.quitGame(true);
}, child: Row( children: [ const Icon(Icons.close), width5, Text( 'Quit', style: Theme.of(context).textTheme.labelSmall, ), ], ), ), );
}
4) quit_button
@OverRide Widget build(BuildContext context) { return SizedBox( width: 100.w, height: 40.h, child: ElevatedButton( style: ButtonStyle( backgroundColor: MaterialStateProperty.all( purple.withOpacity(0.5), ), elevation: MaterialStateProperty.all(0), shape: MaterialStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), ), onPressed: () { _gameViewModel.quitGame(false); }, child: Row( children: [ const Icon(Icons.close), width9, const Text('Quit'), ], ), ), ); }
Sorry, something went wrong.
Thank you for your answer.
I tried the answer you said but it is not fixed. In case I missed something,I created a new branch and pushed the added version of the code you said.
Commit: 4b4e5cd
No branches or pull requests
If someone wins or draws, the game stops, but the timer works again. But the timer should not work either.
The text was updated successfully, but these errors were encountered: