Itempage
This commit is contained in:
@ -2,18 +2,21 @@ class Item {
|
||||
int id;
|
||||
String mime;
|
||||
int tagId;
|
||||
String dest;
|
||||
|
||||
Item({
|
||||
required this.id,
|
||||
required this.mime,
|
||||
required this.tagId
|
||||
this.tagId = 0,
|
||||
this.dest = ''
|
||||
});
|
||||
|
||||
factory Item.fromJson(Map<String, dynamic> data) {
|
||||
return Item(
|
||||
id: data['id'],
|
||||
mime: data['mime'],
|
||||
tagId: data['tag_id']
|
||||
tagId: data['tag_id'] ?? 0,
|
||||
dest: data['dest'] ?? ''
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user