Implemented 2 possibilites of deleting game

This commit is contained in:
2025-06-08 00:48:30 +02:00
parent 36606ba47b
commit d71585b585
5 changed files with 246 additions and 103 deletions

View File

@@ -169,4 +169,17 @@ class LocalStorageService {
return false;
}
}
static Future<bool> deleteAllGames() async {
try {
Globals.gameList.clear();
await saveGameSessions();
logger.i('Alle Runden wurden erfolgreich gelöscht.');
return true;
} catch (e) {
logger.e('Fehler beim Löschen aller Runden: $e',
error: 'Löschen fehlgeschlagen');
return false;
}
}
}