Updated pop return type in roundView
This commit is contained in:
@@ -76,10 +76,8 @@ class _RoundViewState extends State<RoundView> {
|
|||||||
middle: Text(AppLocalizations.of(context).results),
|
middle: Text(AppLocalizations.of(context).results),
|
||||||
leading: CupertinoButton(
|
leading: CupertinoButton(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
onPressed: () => {
|
onPressed: () =>
|
||||||
LocalStorageService.saveGameSessions(),
|
{LocalStorageService.saveGameSessions(), Navigator.pop(context)},
|
||||||
Navigator.pop(context, widget.gameSession)
|
|
||||||
},
|
|
||||||
child: Text(AppLocalizations.of(context).cancel),
|
child: Text(AppLocalizations.of(context).cancel),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -290,7 +288,7 @@ class _RoundViewState extends State<RoundView> {
|
|||||||
? () {
|
? () {
|
||||||
_finishRound();
|
_finishRound();
|
||||||
LocalStorageService.saveGameSessions();
|
LocalStorageService.saveGameSessions();
|
||||||
Navigator.pop(context, -1);
|
Navigator.pop(context);
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
child: Text(AppLocalizations.of(context).done),
|
child: Text(AppLocalizations.of(context).done),
|
||||||
@@ -301,7 +299,7 @@ class _RoundViewState extends State<RoundView> {
|
|||||||
_finishRound();
|
_finishRound();
|
||||||
LocalStorageService.saveGameSessions();
|
LocalStorageService.saveGameSessions();
|
||||||
if (widget.gameSession.isGameFinished == true) {
|
if (widget.gameSession.isGameFinished == true) {
|
||||||
Navigator.pop(context, -1);
|
Navigator.pop(context);
|
||||||
} else {
|
} else {
|
||||||
Navigator.pop(
|
Navigator.pop(
|
||||||
context, widget.roundNumber + 1);
|
context, widget.roundNumber + 1);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: cabo_counter
|
|||||||
description: "Mobile app for the card game Cabo"
|
description: "Mobile app for the card game Cabo"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.3.9+330
|
version: 0.3.9+331
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.5.4
|
sdk: ^3.5.4
|
||||||
|
|||||||
Reference in New Issue
Block a user