fix: no element error
This commit is contained in:
@@ -176,6 +176,10 @@ class _ChooseGameViewState extends State<ChooseGameView> {
|
|||||||
}
|
}
|
||||||
if (result.delete) {
|
if (result.delete) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
// deselect the game
|
||||||
|
if (selectedGameId == game.id) {
|
||||||
|
selectedGameId = '';
|
||||||
|
}
|
||||||
widget.games.removeAt(originalIndex);
|
widget.games.removeAt(originalIndex);
|
||||||
widget.onGamesUpdated?.call();
|
widget.onGamesUpdated?.call();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user