v1.3.0+56
All checks were successful
Flutter Schmutter / build (push) Successful in 3m54s

This commit is contained in:
2025-06-16 15:05:39 +02:00
parent 2a500144f5
commit 14081489cc
22 changed files with 820 additions and 538 deletions

View File

@ -18,6 +18,15 @@ class MediaItem {
});
factory MediaItem.fromJson(Map<String, dynamic> json) {
List<Tag> parsedTags = [];
if (json['tags'] is List) {
parsedTags = (json['tags'] as List<dynamic>)
.map((tagJson) => Tag.fromJson(tagJson as Map<String, dynamic>))
.toList();
} else {
parsedTags = [];
}
return MediaItem(
id: json['id'],
mime: json['mime'],
@ -25,9 +34,7 @@ class MediaItem {
stamp: json['stamp'],
dest: json['dest'],
mode: json['mode'],
tags: (json['tags'] as List<dynamic>)
.map((tagJson) => Tag.fromJson(tagJson))
.toList(),
tags: parsedTags,
);
}