Small changes
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user