mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-29 06:45:54 +08:00
@@ -7,9 +7,9 @@ class Cursor {
|
||||
Cursor({this.max, this.viewAt, this.business, this.ps});
|
||||
|
||||
factory Cursor.fromJson(Map<String, dynamic> json) => Cursor(
|
||||
max: json['max'] as int?,
|
||||
viewAt: json['view_at'] as int?,
|
||||
business: json['business'] as String?,
|
||||
ps: json['ps'] as int?,
|
||||
);
|
||||
max: json['max'] as int?,
|
||||
viewAt: json['view_at'] as int?,
|
||||
business: json['business'] as String?,
|
||||
ps: json['ps'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@ class HistoryData {
|
||||
HistoryData({this.cursor, this.tab, this.list});
|
||||
|
||||
factory HistoryData.fromJson(Map<String, dynamic> json) => HistoryData(
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
tab: (json['tab'] as List<dynamic>?)
|
||||
?.map((e) => HistoryTab.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => HistoryItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
cursor: json['cursor'] == null
|
||||
? null
|
||||
: Cursor.fromJson(json['cursor'] as Map<String, dynamic>),
|
||||
tab: (json['tab'] as List<dynamic>?)
|
||||
?.map((e) => HistoryTab.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => HistoryItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@ class History {
|
||||
});
|
||||
|
||||
factory History.fromJson(Map<String, dynamic> json) => History(
|
||||
oid: json['oid'],
|
||||
epid: json['epid'],
|
||||
bvid: json['bvid'],
|
||||
page: json['page'],
|
||||
cid: json['cid'] == 0 ? null : json['cid'],
|
||||
part: json['part'],
|
||||
business: json['business'],
|
||||
dt: json['dt'],
|
||||
);
|
||||
oid: json['oid'],
|
||||
epid: json['epid'],
|
||||
bvid: json['bvid'],
|
||||
page: json['page'],
|
||||
cid: json['cid'] == 0 ? null : json['cid'],
|
||||
part: json['part'],
|
||||
business: json['business'],
|
||||
dt: json['dt'],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class HistoryTab {
|
||||
HistoryTab({this.type, this.name});
|
||||
|
||||
factory HistoryTab.fromJson(Map<String, dynamic> json) => HistoryTab(
|
||||
type: json['type'] as String?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
type: json['type'] as String?,
|
||||
name: json['name'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user