Merge pull request #120 from flixcoo/bug/119-rounds-with-same-name-get-both-deleted

Rounds with same name get both deleted #119
This commit is contained in:
2025-07-18 22:44:01 +02:00
committed by GitHub
2 changed files with 4 additions and 6 deletions

View File

@@ -126,7 +126,7 @@ class _MainMenuViewState extends State<MainMenuView> {
listenable: session,
builder: (context, _) {
return Dismissible(
key: Key(session.gameTitle),
key: Key(session.id),
background: Container(
color: CupertinoColors.destructiveRed,
alignment: Alignment.centerRight,
@@ -139,14 +139,12 @@ class _MainMenuViewState extends State<MainMenuView> {
),
direction: DismissDirection.endToStart,
confirmDismiss: (direction) async {
final String gameTitle = gameManager
.gameList[index].gameTitle;
return await _showDeleteGamePopup(
context, gameTitle);
context, session.gameTitle);
},
onDismissed: (direction) {
gameManager
.removeGameSessionByIndex(index);
.removeGameSessionById(session.id);
},
dismissThresholds: const {
DismissDirection.startToEnd: 0.6

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo"
publish_to: 'none'
version: 0.4.7+507
version: 0.4.7+509
environment:
sdk: ^3.5.4