f0ckapp/lib/model/item.dart
Flummi ca98d86e26
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
Itempage
2022-05-30 02:29:52 +02:00

23 lines
366 B
Dart

class Item {
int id;
String mime;
int tagId;
String dest;
Item({
required this.id,
required this.mime,
this.tagId = 0,
this.dest = ''
});
factory Item.fromJson(Map<String, dynamic> data) {
return Item(
id: data['id'],
mime: data['mime'],
tagId: data['tag_id'] ?? 0,
dest: data['dest'] ?? ''
);
}
}