Small changes

This commit is contained in:
Felix Kirchner
2025-05-02 11:42:32 +02:00
parent 966179d01d
commit 739bc6a34c
2 changed files with 3 additions and 4 deletions

View File

@@ -46,14 +46,13 @@ class LocalStorageService {
print('Es existiert bereits eine Datei mit Spieldaten');
final jsonString = await file.readAsString();
if (jsonString.isNotEmpty) {
print('Die Datei ist nicht leer');
print('Die gefundene Datei ist nicht leer');
final jsonList = json.decode(jsonString) as List<dynamic>;
print('JSON: $jsonList');
Globals.gameList = jsonList
.map((jsonItem) =>
GameSession.fromJson(jsonItem as Map<String, dynamic>))
.toList()
.cast<GameSession>(); // Explicit cast to List<GameSession>
.cast<GameSession>();
print('Die Daten wurden erfolgreich geladen');
} else {
print('Die Datei ist leer');

View File

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