feat: 历史记录搜索 issues #27

This commit is contained in:
guozhigq
2023-10-01 21:12:18 +08:00
parent 1061ffca3d
commit d83b4bc59e
9 changed files with 314 additions and 13 deletions

View File

@ -3,17 +3,23 @@ class HistoryData {
this.cursor,
this.tab,
this.list,
this.page,
});
Cursor? cursor;
List<HisTabItem>? tab;
List<HisListItem>? list;
Map? page;
HistoryData.fromJson(Map<String, dynamic> json) {
cursor = Cursor.fromJson(json['cursor']);
tab = json['tab'].map<HisTabItem>((e) => HisTabItem.fromJson(e)).toList();
list =
json['list'].map<HisListItem>((e) => HisListItem.fromJson(e)).toList();
cursor = json['cursor'] != null ? Cursor.fromJson(json['cursor']) : null;
tab = json['tab'] != null
? json['tab'].map<HisTabItem>((e) => HisTabItem.fromJson(e)).toList()
: [];
list = json['list'] != null
? json['list'].map<HisListItem>((e) => HisListItem.fromJson(e)).toList()
: [];
page = json['page'];
}
}