mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 12:38:34 +00:00
@@ -1,14 +1,26 @@
|
||||
import 'package:PiliPlus/models_new/member/search_archive/slist.dart';
|
||||
import 'package:PiliPlus/models_new/member/search_archive/vlist.dart';
|
||||
|
||||
class SearchArchiveList {
|
||||
List<ListTag>? tags;
|
||||
List<VListItemModel>? vlist;
|
||||
|
||||
SearchArchiveList({this.vlist});
|
||||
|
||||
factory SearchArchiveList.fromJson(Map<String, dynamic> json) =>
|
||||
SearchArchiveList(
|
||||
vlist: (json['vlist'] as List<dynamic>?)
|
||||
?.map((e) => VListItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
SearchArchiveList.fromJson(Map<String, dynamic> json) {
|
||||
vlist = (json['vlist'] as List<dynamic>?)
|
||||
?.map((e) => VListItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
tags = (json['slist'] as List<dynamic>?)
|
||||
?.map((e) => ListTag.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
(json['tlist'] as Map<String, dynamic>?)?.forEach((k, v) {
|
||||
if (k == '196') {
|
||||
if (tags == null) {
|
||||
tags = [ListTag.fromJson(v)];
|
||||
} else {
|
||||
tags!.add(ListTag.fromJson(v));
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user