mockup and List View in a Modern Design

This commit is contained in:
2026-01-14 14:15:37 +01:00
parent cc849be7c4
commit c065748225
10 changed files with 841 additions and 15 deletions

View File

@@ -34,14 +34,16 @@ class FilamentRepository extends GetxService {
List<FilamentModel> getAllFilaments() {
try {
final data = _storage.read(_storageKey);
if (data == null) return [];
//Wenn nichts gespeichert ist, gebe die Mockup Liste zurück
if (data == null) return FilamentModel.mockupFilamentList;
return (data as List)
.map((json) => FilamentModel.fromJson(json))
.toList();
} catch (e) {
print('Error reading filaments: $e');
return [];
// Bei Fehlerfall gebe die Mockup Liste zurück
return FilamentModel.mockupFilamentList;
}
}