Merge branch 'design'

This commit is contained in:
guozhigq
2024-06-20 23:54:35 +08:00
9 changed files with 105 additions and 55 deletions

View File

@ -5,10 +5,12 @@ class SearchVideoModel {
SearchVideoModel({this.list});
List<SearchVideoItemModel>? list;
SearchVideoModel.fromJson(Map<String, dynamic> json) {
list = json['result']
.where((e) => e['available'] == true)
.map<SearchVideoItemModel>((e) => SearchVideoItemModel.fromJson(e))
.toList();
list = json['result'] == null
? []
: json['result']
.where((e) => e['available'] == true)
.map<SearchVideoItemModel>((e) => SearchVideoItemModel.fromJson(e))
.toList();
}
}