mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-28 14:25:55 +08:00
@@ -1,35 +1,35 @@
|
|||||||
import 'package:PiliPlus/models/bangumi/pgc_timeline/episode.dart';
|
import 'package:PiliPlus/models/bangumi/pgc_timeline/episode.dart';
|
||||||
|
|
||||||
class Result {
|
class Result {
|
||||||
String? date;
|
String? date;
|
||||||
int? dateTs;
|
int? dateTs;
|
||||||
int? dayOfWeek;
|
int? dayOfWeek;
|
||||||
List<Episode>? episodes;
|
List<Episode>? episodes;
|
||||||
int? isToday;
|
int? isToday;
|
||||||
|
|
||||||
Result({
|
Result({
|
||||||
this.date,
|
this.date,
|
||||||
this.dateTs,
|
this.dateTs,
|
||||||
this.dayOfWeek,
|
this.dayOfWeek,
|
||||||
this.episodes,
|
this.episodes,
|
||||||
this.isToday,
|
this.isToday,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Result.fromJson(Map<String, dynamic> json) => Result(
|
factory Result.fromJson(Map<String, dynamic> json) => Result(
|
||||||
date: json['date'] as String?,
|
date: json['date'] as String?,
|
||||||
dateTs: json['date_ts'] as int?,
|
dateTs: json['date_ts'] as int?,
|
||||||
dayOfWeek: json['day_of_week'] as int?,
|
dayOfWeek: json['day_of_week'] as int?,
|
||||||
episodes: (json['episodes'] as List<dynamic>?)
|
episodes: (json['episodes'] as List<dynamic>?)
|
||||||
?.map((e) => Episode.fromJson(e as Map<String, dynamic>))
|
?.map((e) => Episode.fromJson(e as Map<String, dynamic>))
|
||||||
.toList(),
|
.toList(),
|
||||||
isToday: json['is_today'] as int?,
|
isToday: json['is_today'] as int?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'date': date,
|
'date': date,
|
||||||
'date_ts': dateTs,
|
'date_ts': dateTs,
|
||||||
'day_of_week': dayOfWeek,
|
'day_of_week': dayOfWeek,
|
||||||
'episodes': episodes?.map((e) => e.toJson()).toList(),
|
'episodes': episodes?.map((e) => e.toJson()).toList(),
|
||||||
'is_today': isToday,
|
'is_today': isToday,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
9
lib/models/dynamics/article_opus/attributes.dart
Normal file
9
lib/models/dynamics/article_opus/attributes.dart
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
class Attributes {
|
||||||
|
String? clazz;
|
||||||
|
|
||||||
|
Attributes({this.clazz});
|
||||||
|
|
||||||
|
factory Attributes.fromJson(Map<String, dynamic> json) => Attributes(
|
||||||
|
clazz: json['class'] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
92
lib/models/dynamics/article_opus/opus.dart
Normal file
92
lib/models/dynamics/article_opus/opus.dart
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
import 'package:PiliPlus/models/dynamics/article_opus/attributes.dart';
|
||||||
|
|
||||||
|
class ReadOpusModel {
|
||||||
|
dynamic insert;
|
||||||
|
Attributes? attributes;
|
||||||
|
|
||||||
|
ReadOpusModel({this.insert, this.attributes});
|
||||||
|
|
||||||
|
ReadOpusModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['insert'] is Map) {
|
||||||
|
insert = Insert.fromJson(json['insert']);
|
||||||
|
} else {
|
||||||
|
insert = json['insert'];
|
||||||
|
}
|
||||||
|
attributes = json['attributes'] == null
|
||||||
|
? null
|
||||||
|
: Attributes.fromJson(json['attributes'] as Map<String, dynamic>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Insert {
|
||||||
|
InsertCard? card;
|
||||||
|
|
||||||
|
Insert({
|
||||||
|
this.card,
|
||||||
|
});
|
||||||
|
|
||||||
|
Insert.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['article-card'] != null) {
|
||||||
|
card = InsertCard.fromJson(json['article-card']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (json['live-card'] != null) {
|
||||||
|
card = InsertCard.fromJson(json['live-card']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (json['goods-card'] != null) {
|
||||||
|
card = InsertCard.fromJson(json['goods-card']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (json['video-card'] != null) {
|
||||||
|
card = InsertCard.fromJson(json['video-card']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (json['mall-card'] != null) {
|
||||||
|
card = InsertCard.fromJson(json['mall-card']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (json['vote-card'] != null) {
|
||||||
|
card = InsertCard.fromJson(json['vote-card']);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class InsertCard {
|
||||||
|
dynamic tid;
|
||||||
|
String? id;
|
||||||
|
dynamic alt;
|
||||||
|
String? url;
|
||||||
|
num? width;
|
||||||
|
num? height;
|
||||||
|
num? size;
|
||||||
|
String? status;
|
||||||
|
|
||||||
|
InsertCard({
|
||||||
|
this.tid,
|
||||||
|
this.id,
|
||||||
|
this.alt,
|
||||||
|
this.url,
|
||||||
|
this.width,
|
||||||
|
this.height,
|
||||||
|
this.size,
|
||||||
|
this.status,
|
||||||
|
});
|
||||||
|
|
||||||
|
InsertCard.fromJson(Map<String, dynamic> json) {
|
||||||
|
tid = json['tid'];
|
||||||
|
id = json['id'] == '' ? null : json['id'];
|
||||||
|
alt = json['alt'];
|
||||||
|
url = json['url'];
|
||||||
|
width = json['width'];
|
||||||
|
height = json['height'];
|
||||||
|
size = json['size'];
|
||||||
|
status = json['status'];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
class AllSortBy {
|
class AllSortBy {
|
||||||
int? sortBy;
|
int? sortBy;
|
||||||
String? sortName;
|
String? sortName;
|
||||||
|
|
||||||
AllSortBy({this.sortBy, this.sortName});
|
AllSortBy({this.sortBy, this.sortName});
|
||||||
|
|
||||||
factory AllSortBy.fromJson(Map<String, dynamic> json) => AllSortBy(
|
factory AllSortBy.fromJson(Map<String, dynamic> json) => AllSortBy(
|
||||||
sortBy: json['sort_by'] as int?,
|
sortBy: json['sort_by'] as int?,
|
||||||
sortName: json['sort_name'] as String?,
|
sortName: json['sort_name'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'sort_by': sortBy,
|
'sort_by': sortBy,
|
||||||
'sort_name': sortName,
|
'sort_name': sortName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +1,63 @@
|
|||||||
class TopicItem {
|
class TopicItem {
|
||||||
int? id;
|
int? id;
|
||||||
String? name;
|
String? name;
|
||||||
int? view;
|
int? view;
|
||||||
int? discuss;
|
int? discuss;
|
||||||
int? fav;
|
int? fav;
|
||||||
int? dynamics;
|
int? dynamics;
|
||||||
String? jumpUrl;
|
String? jumpUrl;
|
||||||
String? backColor;
|
String? backColor;
|
||||||
String? description;
|
String? description;
|
||||||
String? sharePic;
|
String? sharePic;
|
||||||
String? shareUrl;
|
String? shareUrl;
|
||||||
int? ctime;
|
int? ctime;
|
||||||
bool? showInteractData;
|
bool? showInteractData;
|
||||||
|
|
||||||
TopicItem({
|
TopicItem({
|
||||||
this.id,
|
this.id,
|
||||||
this.name,
|
this.name,
|
||||||
this.view,
|
this.view,
|
||||||
this.discuss,
|
this.discuss,
|
||||||
this.fav,
|
this.fav,
|
||||||
this.dynamics,
|
this.dynamics,
|
||||||
this.jumpUrl,
|
this.jumpUrl,
|
||||||
this.backColor,
|
this.backColor,
|
||||||
this.description,
|
this.description,
|
||||||
this.sharePic,
|
this.sharePic,
|
||||||
this.shareUrl,
|
this.shareUrl,
|
||||||
this.ctime,
|
this.ctime,
|
||||||
this.showInteractData,
|
this.showInteractData,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
|
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
|
||||||
id: json['id'] as int?,
|
id: json['id'] as int?,
|
||||||
name: json['name'] as String?,
|
name: json['name'] as String?,
|
||||||
view: json['view'] as int?,
|
view: json['view'] as int?,
|
||||||
discuss: json['discuss'] as int?,
|
discuss: json['discuss'] as int?,
|
||||||
fav: json['fav'] as int?,
|
fav: json['fav'] as int?,
|
||||||
dynamics: json['dynamics'] as int?,
|
dynamics: json['dynamics'] as int?,
|
||||||
jumpUrl: json['jump_url'] as String?,
|
jumpUrl: json['jump_url'] as String?,
|
||||||
backColor: json['back_color'] as String?,
|
backColor: json['back_color'] as String?,
|
||||||
description: json['description'] as String?,
|
description: json['description'] as String?,
|
||||||
sharePic: json['share_pic'] as String?,
|
sharePic: json['share_pic'] as String?,
|
||||||
shareUrl: json['share_url'] as String?,
|
shareUrl: json['share_url'] as String?,
|
||||||
ctime: json['ctime'] as int?,
|
ctime: json['ctime'] as int?,
|
||||||
showInteractData: json['show_interact_data'] as bool?,
|
showInteractData: json['show_interact_data'] as bool?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'id': id,
|
'id': id,
|
||||||
'name': name,
|
'name': name,
|
||||||
'view': view,
|
'view': view,
|
||||||
'discuss': discuss,
|
'discuss': discuss,
|
||||||
'fav': fav,
|
'fav': fav,
|
||||||
'dynamics': dynamics,
|
'dynamics': dynamics,
|
||||||
'jump_url': jumpUrl,
|
'jump_url': jumpUrl,
|
||||||
'back_color': backColor,
|
'back_color': backColor,
|
||||||
'description': description,
|
'description': description,
|
||||||
'share_pic': sharePic,
|
'share_pic': sharePic,
|
||||||
'share_url': shareUrl,
|
'share_url': shareUrl,
|
||||||
'ctime': ctime,
|
'ctime': ctime,
|
||||||
'show_interact_data': showInteractData,
|
'show_interact_data': showInteractData,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
class TopLeft {
|
class TopLeft {
|
||||||
String? image;
|
String? image;
|
||||||
String? text;
|
String? text;
|
||||||
|
|
||||||
TopLeft({this.image, this.text});
|
TopLeft({this.image, this.text});
|
||||||
|
|
||||||
factory TopLeft.fromJson(Map<String, dynamic> json) => TopLeft(
|
factory TopLeft.fromJson(Map<String, dynamic> json) => TopLeft(
|
||||||
image: json['image'] as String?,
|
image: json['image'] as String?,
|
||||||
text: json['text'] as String?,
|
text: json['text'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'image': image,
|
'image': image,
|
||||||
'text': text,
|
'text': text,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
class TopRight {
|
class TopRight {
|
||||||
String? image;
|
String? image;
|
||||||
String? text;
|
String? text;
|
||||||
|
|
||||||
TopRight({this.image, this.text});
|
TopRight({this.image, this.text});
|
||||||
|
|
||||||
factory TopRight.fromJson(Map<String, dynamic> json) => TopRight(
|
factory TopRight.fromJson(Map<String, dynamic> json) => TopRight(
|
||||||
image: json['image'] as String?,
|
image: json['image'] as String?,
|
||||||
text: json['text'] as String?,
|
text: json['text'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'image': image,
|
'image': image,
|
||||||
'text': text,
|
'text': text,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,22 +2,22 @@ import 'package:PiliPlus/models/live/live_emoticons/top_left.dart';
|
|||||||
import 'package:PiliPlus/models/live/live_emoticons/top_right.dart';
|
import 'package:PiliPlus/models/live/live_emoticons/top_right.dart';
|
||||||
|
|
||||||
class TopShow {
|
class TopShow {
|
||||||
TopLeft? topLeft;
|
TopLeft? topLeft;
|
||||||
TopRight? topRight;
|
TopRight? topRight;
|
||||||
|
|
||||||
TopShow({this.topLeft, this.topRight});
|
TopShow({this.topLeft, this.topRight});
|
||||||
|
|
||||||
factory TopShow.fromJson(Map<String, dynamic> json) => TopShow(
|
factory TopShow.fromJson(Map<String, dynamic> json) => TopShow(
|
||||||
topLeft: json['top_left'] == null
|
topLeft: json['top_left'] == null
|
||||||
? null
|
? null
|
||||||
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
|
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
|
||||||
topRight: json['top_right'] == null
|
topRight: json['top_right'] == null
|
||||||
? null
|
? null
|
||||||
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
|
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'top_left': topLeft?.toJson(),
|
'top_left': topLeft?.toJson(),
|
||||||
'top_right': topRight?.toJson(),
|
'top_right': topRight?.toJson(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,22 +2,22 @@ import 'package:PiliPlus/models/live/live_emoticons/top_left.dart';
|
|||||||
import 'package:PiliPlus/models/live/live_emoticons/top_right.dart';
|
import 'package:PiliPlus/models/live/live_emoticons/top_right.dart';
|
||||||
|
|
||||||
class TopShowRecent {
|
class TopShowRecent {
|
||||||
TopLeft? topLeft;
|
TopLeft? topLeft;
|
||||||
TopRight? topRight;
|
TopRight? topRight;
|
||||||
|
|
||||||
TopShowRecent({this.topLeft, this.topRight});
|
TopShowRecent({this.topLeft, this.topRight});
|
||||||
|
|
||||||
factory TopShowRecent.fromJson(Map<String, dynamic> json) => TopShowRecent(
|
factory TopShowRecent.fromJson(Map<String, dynamic> json) => TopShowRecent(
|
||||||
topLeft: json['top_left'] == null
|
topLeft: json['top_left'] == null
|
||||||
? null
|
? null
|
||||||
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
|
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
|
||||||
topRight: json['top_right'] == null
|
topRight: json['top_right'] == null
|
||||||
? null
|
? null
|
||||||
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
|
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'top_left': topLeft?.toJson(),
|
'top_left': topLeft?.toJson(),
|
||||||
'top_right': topRight?.toJson(),
|
'top_right': topRight?.toJson(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +1,39 @@
|
|||||||
class ModuleInfo {
|
class ModuleInfo {
|
||||||
int? id;
|
int? id;
|
||||||
String? link;
|
String? link;
|
||||||
String? pic;
|
String? pic;
|
||||||
String? title;
|
String? title;
|
||||||
int? type;
|
int? type;
|
||||||
int? sort;
|
int? sort;
|
||||||
int? count;
|
int? count;
|
||||||
|
|
||||||
ModuleInfo({
|
ModuleInfo({
|
||||||
this.id,
|
this.id,
|
||||||
this.link,
|
this.link,
|
||||||
this.pic,
|
this.pic,
|
||||||
this.title,
|
this.title,
|
||||||
this.type,
|
this.type,
|
||||||
this.sort,
|
this.sort,
|
||||||
this.count,
|
this.count,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory ModuleInfo.fromJson(Map<String, dynamic> json) => ModuleInfo(
|
factory ModuleInfo.fromJson(Map<String, dynamic> json) => ModuleInfo(
|
||||||
id: json['id'] as int?,
|
id: json['id'] as int?,
|
||||||
link: json['link'] as String?,
|
link: json['link'] as String?,
|
||||||
pic: json['pic'] as String?,
|
pic: json['pic'] as String?,
|
||||||
title: json['title'] as String?,
|
title: json['title'] as String?,
|
||||||
type: json['type'] as int?,
|
type: json['type'] as int?,
|
||||||
sort: json['sort'] as int?,
|
sort: json['sort'] as int?,
|
||||||
count: json['count'] as int?,
|
count: json['count'] as int?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'id': id,
|
'id': id,
|
||||||
'link': link,
|
'link': link,
|
||||||
'pic': pic,
|
'pic': pic,
|
||||||
'title': title,
|
'title': title,
|
||||||
'type': type,
|
'type': type,
|
||||||
'sort': sort,
|
'sort': sort,
|
||||||
'count': count,
|
'count': count,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,17 +4,17 @@ part 'achieve.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Achieve {
|
class Achieve {
|
||||||
@JsonKey(name: 'is_default')
|
@JsonKey(name: 'is_default')
|
||||||
bool? isDefault;
|
bool? isDefault;
|
||||||
String? image;
|
String? image;
|
||||||
@JsonKey(name: 'achieve_url')
|
@JsonKey(name: 'achieve_url')
|
||||||
String? achieveUrl;
|
String? achieveUrl;
|
||||||
|
|
||||||
Achieve({this.isDefault, this.image, this.achieveUrl});
|
Achieve({this.isDefault, this.image, this.achieveUrl});
|
||||||
|
|
||||||
factory Achieve.fromJson(Map<String, dynamic> json) {
|
factory Achieve.fromJson(Map<String, dynamic> json) {
|
||||||
return _$AchieveFromJson(json);
|
return _$AchieveFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$AchieveToJson(this);
|
Map<String, dynamic> toJson() => _$AchieveToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,17 +4,17 @@ part 'article.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Article {
|
class Article {
|
||||||
int? count;
|
int? count;
|
||||||
List<dynamic>? item;
|
List<dynamic>? item;
|
||||||
@JsonKey(name: 'lists_count')
|
@JsonKey(name: 'lists_count')
|
||||||
int? listsCount;
|
int? listsCount;
|
||||||
List<dynamic>? lists;
|
List<dynamic>? lists;
|
||||||
|
|
||||||
Article({this.count, this.item, this.listsCount, this.lists});
|
Article({this.count, this.item, this.listsCount, this.lists});
|
||||||
|
|
||||||
factory Article.fromJson(Map<String, dynamic> json) {
|
factory Article.fromJson(Map<String, dynamic> json) {
|
||||||
return _$ArticleFromJson(json);
|
return _$ArticleFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ArticleToJson(this);
|
Map<String, dynamic> toJson() => _$ArticleToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ part 'attention_tip.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class AttentionTip {
|
class AttentionTip {
|
||||||
@JsonKey(name: 'card_num')
|
@JsonKey(name: 'card_num')
|
||||||
int? cardNum;
|
int? cardNum;
|
||||||
String? tip;
|
String? tip;
|
||||||
|
|
||||||
AttentionTip({this.cardNum, this.tip});
|
AttentionTip({this.cardNum, this.tip});
|
||||||
|
|
||||||
factory AttentionTip.fromJson(Map<String, dynamic> json) {
|
factory AttentionTip.fromJson(Map<String, dynamic> json) {
|
||||||
return _$AttentionTipFromJson(json);
|
return _$AttentionTipFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$AttentionTipToJson(this);
|
Map<String, dynamic> toJson() => _$AttentionTipToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'audios.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Audios {
|
class Audios {
|
||||||
int? count;
|
int? count;
|
||||||
List<dynamic>? item;
|
List<dynamic>? item;
|
||||||
|
|
||||||
Audios({this.count, this.item});
|
Audios({this.count, this.item});
|
||||||
|
|
||||||
factory Audios.fromJson(Map<String, dynamic> json) {
|
factory Audios.fromJson(Map<String, dynamic> json) {
|
||||||
return _$AudiosFromJson(json);
|
return _$AudiosFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$AudiosToJson(this);
|
Map<String, dynamic> toJson() => _$AudiosToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,17 +7,17 @@ part 'avatar.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Avatar {
|
class Avatar {
|
||||||
@JsonKey(name: 'container_size')
|
@JsonKey(name: 'container_size')
|
||||||
ContainerSize? containerSize;
|
ContainerSize? containerSize;
|
||||||
@JsonKey(name: 'fallback_layers')
|
@JsonKey(name: 'fallback_layers')
|
||||||
FallbackLayers? fallbackLayers;
|
FallbackLayers? fallbackLayers;
|
||||||
String? mid;
|
String? mid;
|
||||||
|
|
||||||
Avatar({this.containerSize, this.fallbackLayers, this.mid});
|
Avatar({this.containerSize, this.fallbackLayers, this.mid});
|
||||||
|
|
||||||
factory Avatar.fromJson(Map<String, dynamic> json) {
|
factory Avatar.fromJson(Map<String, dynamic> json) {
|
||||||
return _$AvatarFromJson(json);
|
return _$AvatarFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$AvatarToJson(this);
|
Map<String, dynamic> toJson() => _$AvatarToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,16 +7,16 @@ part 'color_config.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class ColorConfig {
|
class ColorConfig {
|
||||||
@JsonKey(name: 'is_dark_mode_aware')
|
@JsonKey(name: 'is_dark_mode_aware')
|
||||||
bool? isDarkModeAware;
|
bool? isDarkModeAware;
|
||||||
Day? day;
|
Day? day;
|
||||||
Night? night;
|
Night? night;
|
||||||
|
|
||||||
ColorConfig({this.isDarkModeAware, this.day, this.night});
|
ColorConfig({this.isDarkModeAware, this.day, this.night});
|
||||||
|
|
||||||
factory ColorConfig.fromJson(Map<String, dynamic> json) {
|
factory ColorConfig.fromJson(Map<String, dynamic> json) {
|
||||||
return _$ColorConfigFromJson(json);
|
return _$ColorConfigFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ColorConfigToJson(this);
|
Map<String, dynamic> toJson() => _$ColorConfigToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'colour.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Colour {
|
class Colour {
|
||||||
String? dark;
|
String? dark;
|
||||||
String? normal;
|
String? normal;
|
||||||
|
|
||||||
Colour({this.dark, this.normal});
|
Colour({this.dark, this.normal});
|
||||||
|
|
||||||
factory Colour.fromJson(Map<String, dynamic> json) {
|
factory Colour.fromJson(Map<String, dynamic> json) {
|
||||||
return _$ColourFromJson(json);
|
return _$ColourFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ColourToJson(this);
|
Map<String, dynamic> toJson() => _$ColourToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'container_size.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class ContainerSize {
|
class ContainerSize {
|
||||||
double? width;
|
double? width;
|
||||||
double? height;
|
double? height;
|
||||||
|
|
||||||
ContainerSize({this.width, this.height});
|
ContainerSize({this.width, this.height});
|
||||||
|
|
||||||
factory ContainerSize.fromJson(Map<String, dynamic> json) {
|
factory ContainerSize.fromJson(Map<String, dynamic> json) {
|
||||||
return _$ContainerSizeFromJson(json);
|
return _$ContainerSizeFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ContainerSizeToJson(this);
|
Map<String, dynamic> toJson() => _$ContainerSizeToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ part 'day.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Day {
|
class Day {
|
||||||
String? argb;
|
String? argb;
|
||||||
|
|
||||||
Day({this.argb});
|
Day({this.argb});
|
||||||
|
|
||||||
factory Day.fromJson(Map<String, dynamic> json) => _$DayFromJson(json);
|
factory Day.fromJson(Map<String, dynamic> json) => _$DayFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$DayToJson(this);
|
Map<String, dynamic> toJson() => _$DayToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,44 +4,44 @@ part 'digital_info.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class DigitalInfo {
|
class DigitalInfo {
|
||||||
bool? active;
|
bool? active;
|
||||||
@JsonKey(name: 'nft_type')
|
@JsonKey(name: 'nft_type')
|
||||||
int? nftType;
|
int? nftType;
|
||||||
@JsonKey(name: 'background_handle')
|
@JsonKey(name: 'background_handle')
|
||||||
int? backgroundHandle;
|
int? backgroundHandle;
|
||||||
@JsonKey(name: 'animation_first_frame')
|
@JsonKey(name: 'animation_first_frame')
|
||||||
String? animationFirstFrame;
|
String? animationFirstFrame;
|
||||||
@JsonKey(name: 'music_album')
|
@JsonKey(name: 'music_album')
|
||||||
dynamic musicAlbum;
|
dynamic musicAlbum;
|
||||||
dynamic animation;
|
dynamic animation;
|
||||||
@JsonKey(name: 'nft_region_title')
|
@JsonKey(name: 'nft_region_title')
|
||||||
String? nftRegionTitle;
|
String? nftRegionTitle;
|
||||||
@JsonKey(name: 'card_id')
|
@JsonKey(name: 'card_id')
|
||||||
int? cardId;
|
int? cardId;
|
||||||
@JsonKey(name: 'cut_space_bg')
|
@JsonKey(name: 'cut_space_bg')
|
||||||
String? cutSpaceBg;
|
String? cutSpaceBg;
|
||||||
@JsonKey(name: 'part_type')
|
@JsonKey(name: 'part_type')
|
||||||
int? partType;
|
int? partType;
|
||||||
@JsonKey(name: 'item_jump_url')
|
@JsonKey(name: 'item_jump_url')
|
||||||
String? itemJumpUrl;
|
String? itemJumpUrl;
|
||||||
|
|
||||||
DigitalInfo({
|
DigitalInfo({
|
||||||
this.active,
|
this.active,
|
||||||
this.nftType,
|
this.nftType,
|
||||||
this.backgroundHandle,
|
this.backgroundHandle,
|
||||||
this.animationFirstFrame,
|
this.animationFirstFrame,
|
||||||
this.musicAlbum,
|
this.musicAlbum,
|
||||||
this.animation,
|
this.animation,
|
||||||
this.nftRegionTitle,
|
this.nftRegionTitle,
|
||||||
this.cardId,
|
this.cardId,
|
||||||
this.cutSpaceBg,
|
this.cutSpaceBg,
|
||||||
this.partType,
|
this.partType,
|
||||||
this.itemJumpUrl,
|
this.itemJumpUrl,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory DigitalInfo.fromJson(Map<String, dynamic> json) {
|
factory DigitalInfo.fromJson(Map<String, dynamic> json) {
|
||||||
return _$DigitalInfoFromJson(json);
|
return _$DigitalInfoFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$DigitalInfoToJson(this);
|
Map<String, dynamic> toJson() => _$DigitalInfoToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ part 'draw.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Draw {
|
class Draw {
|
||||||
@JsonKey(name: 'draw_type')
|
@JsonKey(name: 'draw_type')
|
||||||
int? drawType;
|
int? drawType;
|
||||||
@JsonKey(name: 'fill_mode')
|
@JsonKey(name: 'fill_mode')
|
||||||
int? fillMode;
|
int? fillMode;
|
||||||
@JsonKey(name: 'color_config')
|
@JsonKey(name: 'color_config')
|
||||||
ColorConfig? colorConfig;
|
ColorConfig? colorConfig;
|
||||||
|
|
||||||
Draw({this.drawType, this.fillMode, this.colorConfig});
|
Draw({this.drawType, this.fillMode, this.colorConfig});
|
||||||
|
|
||||||
factory Draw.fromJson(Map<String, dynamic> json) => _$DrawFromJson(json);
|
factory Draw.fromJson(Map<String, dynamic> json) => _$DrawFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$DrawToJson(this);
|
Map<String, dynamic> toJson() => _$DrawToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ part 'draw_src.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class DrawSrc {
|
class DrawSrc {
|
||||||
@JsonKey(name: 'src_type')
|
@JsonKey(name: 'src_type')
|
||||||
int? srcType;
|
int? srcType;
|
||||||
Draw? draw;
|
Draw? draw;
|
||||||
|
|
||||||
DrawSrc({this.srcType, this.draw});
|
DrawSrc({this.srcType, this.draw});
|
||||||
|
|
||||||
factory DrawSrc.fromJson(Map<String, dynamic> json) {
|
factory DrawSrc.fromJson(Map<String, dynamic> json) {
|
||||||
return _$DrawSrcFromJson(json);
|
return _$DrawSrcFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$DrawSrcToJson(this);
|
Map<String, dynamic> toJson() => _$DrawSrcToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,17 +4,17 @@ part 'entrance.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Entrance {
|
class Entrance {
|
||||||
String? icon;
|
String? icon;
|
||||||
@JsonKey(name: 'jump_url')
|
@JsonKey(name: 'jump_url')
|
||||||
String? jumpUrl;
|
String? jumpUrl;
|
||||||
@JsonKey(name: 'is_show_entrance')
|
@JsonKey(name: 'is_show_entrance')
|
||||||
bool? isShowEntrance;
|
bool? isShowEntrance;
|
||||||
|
|
||||||
Entrance({this.icon, this.jumpUrl, this.isShowEntrance});
|
Entrance({this.icon, this.jumpUrl, this.isShowEntrance});
|
||||||
|
|
||||||
factory Entrance.fromJson(Map<String, dynamic> json) {
|
factory Entrance.fromJson(Map<String, dynamic> json) {
|
||||||
return _$EntranceFromJson(json);
|
return _$EntranceFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$EntranceToJson(this);
|
Map<String, dynamic> toJson() => _$EntranceToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'entrance_button.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class EntranceButton {
|
class EntranceButton {
|
||||||
String? uri;
|
String? uri;
|
||||||
String? title;
|
String? title;
|
||||||
|
|
||||||
EntranceButton({this.uri, this.title});
|
EntranceButton({this.uri, this.title});
|
||||||
|
|
||||||
factory EntranceButton.fromJson(Map<String, dynamic> json) {
|
factory EntranceButton.fromJson(Map<String, dynamic> json) {
|
||||||
return _$EntranceButtonFromJson(json);
|
return _$EntranceButtonFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$EntranceButtonToJson(this);
|
Map<String, dynamic> toJson() => _$EntranceButtonToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'episodic_button.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class EpisodicButton {
|
class EpisodicButton {
|
||||||
String? text;
|
String? text;
|
||||||
String? uri;
|
String? uri;
|
||||||
|
|
||||||
EpisodicButton({this.text, this.uri});
|
EpisodicButton({this.text, this.uri});
|
||||||
|
|
||||||
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
|
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
|
||||||
return _$EpisodicButtonFromJson(json);
|
return _$EpisodicButtonFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$EpisodicButtonToJson(this);
|
Map<String, dynamic> toJson() => _$EpisodicButtonToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ part 'fallback_layers.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class FallbackLayers {
|
class FallbackLayers {
|
||||||
List<Layer>? layers;
|
List<Layer>? layers;
|
||||||
@JsonKey(name: 'is_critical_group')
|
@JsonKey(name: 'is_critical_group')
|
||||||
bool? isCriticalGroup;
|
bool? isCriticalGroup;
|
||||||
|
|
||||||
FallbackLayers({this.layers, this.isCriticalGroup});
|
FallbackLayers({this.layers, this.isCriticalGroup});
|
||||||
|
|
||||||
factory FallbackLayers.fromJson(Map<String, dynamic> json) {
|
factory FallbackLayers.fromJson(Map<String, dynamic> json) {
|
||||||
return _$FallbackLayersFromJson(json);
|
return _$FallbackLayersFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$FallbackLayersToJson(this);
|
Map<String, dynamic> toJson() => _$FallbackLayersToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,18 +8,18 @@ part 'general_spec.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class GeneralSpec {
|
class GeneralSpec {
|
||||||
@JsonKey(name: 'pos_spec')
|
@JsonKey(name: 'pos_spec')
|
||||||
PosSpec? posSpec;
|
PosSpec? posSpec;
|
||||||
@JsonKey(name: 'size_spec')
|
@JsonKey(name: 'size_spec')
|
||||||
SizeSpec? sizeSpec;
|
SizeSpec? sizeSpec;
|
||||||
@JsonKey(name: 'render_spec')
|
@JsonKey(name: 'render_spec')
|
||||||
RenderSpec? renderSpec;
|
RenderSpec? renderSpec;
|
||||||
|
|
||||||
GeneralSpec({this.posSpec, this.sizeSpec, this.renderSpec});
|
GeneralSpec({this.posSpec, this.sizeSpec, this.renderSpec});
|
||||||
|
|
||||||
factory GeneralSpec.fromJson(Map<String, dynamic> json) {
|
factory GeneralSpec.fromJson(Map<String, dynamic> json) {
|
||||||
return _$GeneralSpecFromJson(json);
|
return _$GeneralSpecFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$GeneralSpecToJson(this);
|
Map<String, dynamic> toJson() => _$GeneralSpecToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ part 'honours.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Honours {
|
class Honours {
|
||||||
Colour? colour;
|
Colour? colour;
|
||||||
List<dynamic>? tags;
|
List<dynamic>? tags;
|
||||||
|
|
||||||
Honours({this.colour, this.tags});
|
Honours({this.colour, this.tags});
|
||||||
|
|
||||||
factory Honours.fromJson(Map<String, dynamic> json) {
|
factory Honours.fromJson(Map<String, dynamic> json) {
|
||||||
return _$HonoursFromJson(json);
|
return _$HonoursFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$HonoursToJson(this);
|
Map<String, dynamic> toJson() => _$HonoursToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,16 +8,16 @@ part 'layer.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Layer {
|
class Layer {
|
||||||
bool? visible;
|
bool? visible;
|
||||||
@JsonKey(name: 'general_spec')
|
@JsonKey(name: 'general_spec')
|
||||||
GeneralSpec? generalSpec;
|
GeneralSpec? generalSpec;
|
||||||
@JsonKey(name: 'layer_config')
|
@JsonKey(name: 'layer_config')
|
||||||
LayerConfig? layerConfig;
|
LayerConfig? layerConfig;
|
||||||
Resource? resource;
|
Resource? resource;
|
||||||
|
|
||||||
Layer({this.visible, this.generalSpec, this.layerConfig, this.resource});
|
Layer({this.visible, this.generalSpec, this.layerConfig, this.resource});
|
||||||
|
|
||||||
factory Layer.fromJson(Map<String, dynamic> json) => _$LayerFromJson(json);
|
factory Layer.fromJson(Map<String, dynamic> json) => _$LayerFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$LayerToJson(this);
|
Map<String, dynamic> toJson() => _$LayerToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,30 +6,30 @@ part 'level_info.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class LevelInfo {
|
class LevelInfo {
|
||||||
@JsonKey(name: 'current_level')
|
@JsonKey(name: 'current_level')
|
||||||
int? currentLevel;
|
int? currentLevel;
|
||||||
@JsonKey(name: 'current_min')
|
@JsonKey(name: 'current_min')
|
||||||
int? currentMin;
|
int? currentMin;
|
||||||
@JsonKey(name: 'current_exp')
|
@JsonKey(name: 'current_exp')
|
||||||
int? currentExp;
|
int? currentExp;
|
||||||
@JsonKey(name: 'next_exp')
|
@JsonKey(name: 'next_exp')
|
||||||
dynamic nextExp;
|
dynamic nextExp;
|
||||||
int? identity;
|
int? identity;
|
||||||
@JsonKey(name: 'senior_inquiry')
|
@JsonKey(name: 'senior_inquiry')
|
||||||
SeniorInquiry? seniorInquiry;
|
SeniorInquiry? seniorInquiry;
|
||||||
|
|
||||||
LevelInfo({
|
LevelInfo({
|
||||||
this.currentLevel,
|
this.currentLevel,
|
||||||
this.currentMin,
|
this.currentMin,
|
||||||
this.currentExp,
|
this.currentExp,
|
||||||
this.nextExp,
|
this.nextExp,
|
||||||
this.identity,
|
this.identity,
|
||||||
this.seniorInquiry,
|
this.seniorInquiry,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory LevelInfo.fromJson(Map<String, dynamic> json) {
|
factory LevelInfo.fromJson(Map<String, dynamic> json) {
|
||||||
return _$LevelInfoFromJson(json);
|
return _$LevelInfoFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$LevelInfoToJson(this);
|
Map<String, dynamic> toJson() => _$LevelInfoToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,26 +4,26 @@ part 'nameplate.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Nameplate {
|
class Nameplate {
|
||||||
int? nid;
|
int? nid;
|
||||||
String? name;
|
String? name;
|
||||||
String? image;
|
String? image;
|
||||||
@JsonKey(name: 'image_small')
|
@JsonKey(name: 'image_small')
|
||||||
String? imageSmall;
|
String? imageSmall;
|
||||||
String? level;
|
String? level;
|
||||||
String? condition;
|
String? condition;
|
||||||
|
|
||||||
Nameplate({
|
Nameplate({
|
||||||
this.nid,
|
this.nid,
|
||||||
this.name,
|
this.name,
|
||||||
this.image,
|
this.image,
|
||||||
this.imageSmall,
|
this.imageSmall,
|
||||||
this.level,
|
this.level,
|
||||||
this.condition,
|
this.condition,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Nameplate.fromJson(Map<String, dynamic> json) {
|
factory Nameplate.fromJson(Map<String, dynamic> json) {
|
||||||
return _$NameplateFromJson(json);
|
return _$NameplateFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$NameplateToJson(this);
|
Map<String, dynamic> toJson() => _$NameplateToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'nft_certificate.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class NftCertificate {
|
class NftCertificate {
|
||||||
@JsonKey(name: 'detail_url')
|
@JsonKey(name: 'detail_url')
|
||||||
String? detailUrl;
|
String? detailUrl;
|
||||||
|
|
||||||
NftCertificate({this.detailUrl});
|
NftCertificate({this.detailUrl});
|
||||||
|
|
||||||
factory NftCertificate.fromJson(Map<String, dynamic> json) {
|
factory NftCertificate.fromJson(Map<String, dynamic> json) {
|
||||||
return _$NftCertificateFromJson(json);
|
return _$NftCertificateFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$NftCertificateToJson(this);
|
Map<String, dynamic> toJson() => _$NftCertificateToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ part 'night.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Night {
|
class Night {
|
||||||
String? argb;
|
String? argb;
|
||||||
|
|
||||||
Night({this.argb});
|
Night({this.argb});
|
||||||
|
|
||||||
factory Night.fromJson(Map<String, dynamic> json) => _$NightFromJson(json);
|
factory Night.fromJson(Map<String, dynamic> json) => _$NightFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$NightToJson(this);
|
Map<String, dynamic> toJson() => _$NightToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ part 'order.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Order {
|
class Order {
|
||||||
String? title;
|
String? title;
|
||||||
String? value;
|
String? value;
|
||||||
|
|
||||||
Order({this.title, this.value});
|
Order({this.title, this.value});
|
||||||
|
|
||||||
factory Order.fromJson(Map<String, dynamic> json) => _$OrderFromJson(json);
|
factory Order.fromJson(Map<String, dynamic> json) => _$OrderFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$OrderToJson(this);
|
Map<String, dynamic> toJson() => _$OrderToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,18 +4,18 @@ part 'pos_spec.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class PosSpec {
|
class PosSpec {
|
||||||
@JsonKey(name: 'coordinate_pos')
|
@JsonKey(name: 'coordinate_pos')
|
||||||
int? coordinatePos;
|
int? coordinatePos;
|
||||||
@JsonKey(name: 'axis_x')
|
@JsonKey(name: 'axis_x')
|
||||||
double? axisX;
|
double? axisX;
|
||||||
@JsonKey(name: 'axis_y')
|
@JsonKey(name: 'axis_y')
|
||||||
double? axisY;
|
double? axisY;
|
||||||
|
|
||||||
PosSpec({this.coordinatePos, this.axisX, this.axisY});
|
PosSpec({this.coordinatePos, this.axisX, this.axisY});
|
||||||
|
|
||||||
factory PosSpec.fromJson(Map<String, dynamic> json) {
|
factory PosSpec.fromJson(Map<String, dynamic> json) {
|
||||||
return _$PosSpecFromJson(json);
|
return _$PosSpecFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$PosSpecToJson(this);
|
Map<String, dynamic> toJson() => _$PosSpecToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ part 'profession_verify.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class ProfessionVerify {
|
class ProfessionVerify {
|
||||||
String? icon;
|
String? icon;
|
||||||
@JsonKey(name: 'show_desc')
|
@JsonKey(name: 'show_desc')
|
||||||
String? showDesc;
|
String? showDesc;
|
||||||
|
|
||||||
ProfessionVerify({this.icon, this.showDesc});
|
ProfessionVerify({this.icon, this.showDesc});
|
||||||
|
|
||||||
factory ProfessionVerify.fromJson(Map<String, dynamic> json) {
|
factory ProfessionVerify.fromJson(Map<String, dynamic> json) {
|
||||||
return _$ProfessionVerifyFromJson(json);
|
return _$ProfessionVerifyFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ProfessionVerifyToJson(this);
|
Map<String, dynamic> toJson() => _$ProfessionVerifyToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'purchase_button.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class PurchaseButton {
|
class PurchaseButton {
|
||||||
String? uri;
|
String? uri;
|
||||||
String? title;
|
String? title;
|
||||||
|
|
||||||
PurchaseButton({this.uri, this.title});
|
PurchaseButton({this.uri, this.title});
|
||||||
|
|
||||||
factory PurchaseButton.fromJson(Map<String, dynamic> json) {
|
factory PurchaseButton.fromJson(Map<String, dynamic> json) {
|
||||||
return _$PurchaseButtonFromJson(json);
|
return _$PurchaseButtonFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$PurchaseButtonToJson(this);
|
Map<String, dynamic> toJson() => _$PurchaseButtonToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ part 'render_spec.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class RenderSpec {
|
class RenderSpec {
|
||||||
int? opacity;
|
int? opacity;
|
||||||
|
|
||||||
RenderSpec({this.opacity});
|
RenderSpec({this.opacity});
|
||||||
|
|
||||||
factory RenderSpec.fromJson(Map<String, dynamic> json) {
|
factory RenderSpec.fromJson(Map<String, dynamic> json) {
|
||||||
return _$RenderSpecFromJson(json);
|
return _$RenderSpecFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$RenderSpecToJson(this);
|
Map<String, dynamic> toJson() => _$RenderSpecToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ part 'res_native_draw.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class ResNativeDraw {
|
class ResNativeDraw {
|
||||||
@JsonKey(name: 'draw_src')
|
@JsonKey(name: 'draw_src')
|
||||||
DrawSrc? drawSrc;
|
DrawSrc? drawSrc;
|
||||||
|
|
||||||
ResNativeDraw({this.drawSrc});
|
ResNativeDraw({this.drawSrc});
|
||||||
|
|
||||||
factory ResNativeDraw.fromJson(Map<String, dynamic> json) {
|
factory ResNativeDraw.fromJson(Map<String, dynamic> json) {
|
||||||
return _$ResNativeDrawFromJson(json);
|
return _$ResNativeDrawFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ResNativeDrawToJson(this);
|
Map<String, dynamic> toJson() => _$ResNativeDrawToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ part 'resource.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Resource {
|
class Resource {
|
||||||
@JsonKey(name: 'res_type')
|
@JsonKey(name: 'res_type')
|
||||||
int? resType;
|
int? resType;
|
||||||
@JsonKey(name: 'res_native_draw')
|
@JsonKey(name: 'res_native_draw')
|
||||||
ResNativeDraw? resNativeDraw;
|
ResNativeDraw? resNativeDraw;
|
||||||
|
|
||||||
Resource({this.resType, this.resNativeDraw});
|
Resource({this.resType, this.resNativeDraw});
|
||||||
|
|
||||||
factory Resource.fromJson(Map<String, dynamic> json) {
|
factory Resource.fromJson(Map<String, dynamic> json) {
|
||||||
return _$ResourceFromJson(json);
|
return _$ResourceFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ResourceToJson(this);
|
Map<String, dynamic> toJson() => _$ResourceToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ part 'senior_inquiry.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class SeniorInquiry {
|
class SeniorInquiry {
|
||||||
@JsonKey(name: 'inquiry_text')
|
@JsonKey(name: 'inquiry_text')
|
||||||
String? inquiryText;
|
String? inquiryText;
|
||||||
@JsonKey(name: 'inquiry_url')
|
@JsonKey(name: 'inquiry_url')
|
||||||
String? inquiryUrl;
|
String? inquiryUrl;
|
||||||
|
|
||||||
SeniorInquiry({this.inquiryText, this.inquiryUrl});
|
SeniorInquiry({this.inquiryText, this.inquiryUrl});
|
||||||
|
|
||||||
factory SeniorInquiry.fromJson(Map<String, dynamic> json) {
|
factory SeniorInquiry.fromJson(Map<String, dynamic> json) {
|
||||||
return _$SeniorInquiryFromJson(json);
|
return _$SeniorInquiryFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$SeniorInquiryToJson(this);
|
Map<String, dynamic> toJson() => _$SeniorInquiryToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ part 'series.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Series {
|
class Series {
|
||||||
List<dynamic>? item;
|
List<dynamic>? item;
|
||||||
|
|
||||||
Series({this.item});
|
Series({this.item});
|
||||||
|
|
||||||
factory Series.fromJson(Map<String, dynamic> json) {
|
factory Series.fromJson(Map<String, dynamic> json) {
|
||||||
return _$SeriesFromJson(json);
|
return _$SeriesFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$SeriesToJson(this);
|
Map<String, dynamic> toJson() => _$SeriesToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,65 +4,65 @@ part 'setting.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Setting {
|
class Setting {
|
||||||
int? channel;
|
int? channel;
|
||||||
@JsonKey(name: 'fav_video')
|
@JsonKey(name: 'fav_video')
|
||||||
int? favVideo;
|
int? favVideo;
|
||||||
@JsonKey(name: 'coins_video')
|
@JsonKey(name: 'coins_video')
|
||||||
int? coinsVideo;
|
int? coinsVideo;
|
||||||
@JsonKey(name: 'likes_video')
|
@JsonKey(name: 'likes_video')
|
||||||
int? likesVideo;
|
int? likesVideo;
|
||||||
int? bangumi;
|
int? bangumi;
|
||||||
@JsonKey(name: 'played_game')
|
@JsonKey(name: 'played_game')
|
||||||
int? playedGame;
|
int? playedGame;
|
||||||
int? groups;
|
int? groups;
|
||||||
int? comic;
|
int? comic;
|
||||||
int? bbq;
|
int? bbq;
|
||||||
@JsonKey(name: 'dress_up')
|
@JsonKey(name: 'dress_up')
|
||||||
int? dressUp;
|
int? dressUp;
|
||||||
@JsonKey(name: 'disable_following')
|
@JsonKey(name: 'disable_following')
|
||||||
int? disableFollowing;
|
int? disableFollowing;
|
||||||
@JsonKey(name: 'live_playback')
|
@JsonKey(name: 'live_playback')
|
||||||
int? livePlayback;
|
int? livePlayback;
|
||||||
@JsonKey(name: 'close_space_medal')
|
@JsonKey(name: 'close_space_medal')
|
||||||
int? closeSpaceMedal;
|
int? closeSpaceMedal;
|
||||||
@JsonKey(name: 'only_show_wearing')
|
@JsonKey(name: 'only_show_wearing')
|
||||||
int? onlyShowWearing;
|
int? onlyShowWearing;
|
||||||
@JsonKey(name: 'disable_show_school')
|
@JsonKey(name: 'disable_show_school')
|
||||||
int? disableShowSchool;
|
int? disableShowSchool;
|
||||||
@JsonKey(name: 'disable_show_nft')
|
@JsonKey(name: 'disable_show_nft')
|
||||||
int? disableShowNft;
|
int? disableShowNft;
|
||||||
@JsonKey(name: 'disable_show_fans')
|
@JsonKey(name: 'disable_show_fans')
|
||||||
int? disableShowFans;
|
int? disableShowFans;
|
||||||
@JsonKey(name: 'charge_video')
|
@JsonKey(name: 'charge_video')
|
||||||
int? chargeVideo;
|
int? chargeVideo;
|
||||||
@JsonKey(name: 'lesson_video')
|
@JsonKey(name: 'lesson_video')
|
||||||
int? lessonVideo;
|
int? lessonVideo;
|
||||||
|
|
||||||
Setting({
|
Setting({
|
||||||
this.channel,
|
this.channel,
|
||||||
this.favVideo,
|
this.favVideo,
|
||||||
this.coinsVideo,
|
this.coinsVideo,
|
||||||
this.likesVideo,
|
this.likesVideo,
|
||||||
this.bangumi,
|
this.bangumi,
|
||||||
this.playedGame,
|
this.playedGame,
|
||||||
this.groups,
|
this.groups,
|
||||||
this.comic,
|
this.comic,
|
||||||
this.bbq,
|
this.bbq,
|
||||||
this.dressUp,
|
this.dressUp,
|
||||||
this.disableFollowing,
|
this.disableFollowing,
|
||||||
this.livePlayback,
|
this.livePlayback,
|
||||||
this.closeSpaceMedal,
|
this.closeSpaceMedal,
|
||||||
this.onlyShowWearing,
|
this.onlyShowWearing,
|
||||||
this.disableShowSchool,
|
this.disableShowSchool,
|
||||||
this.disableShowNft,
|
this.disableShowNft,
|
||||||
this.disableShowFans,
|
this.disableShowFans,
|
||||||
this.chargeVideo,
|
this.chargeVideo,
|
||||||
this.lessonVideo,
|
this.lessonVideo,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Setting.fromJson(Map<String, dynamic> json) {
|
factory Setting.fromJson(Map<String, dynamic> json) {
|
||||||
return _$SettingFromJson(json);
|
return _$SettingFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$SettingToJson(this);
|
Map<String, dynamic> toJson() => _$SettingToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'size_spec.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class SizeSpec {
|
class SizeSpec {
|
||||||
double? width;
|
double? width;
|
||||||
double? height;
|
double? height;
|
||||||
|
|
||||||
SizeSpec({this.width, this.height});
|
SizeSpec({this.width, this.height});
|
||||||
|
|
||||||
factory SizeSpec.fromJson(Map<String, dynamic> json) {
|
factory SizeSpec.fromJson(Map<String, dynamic> json) {
|
||||||
return _$SizeSpecFromJson(json);
|
return _$SizeSpecFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$SizeSpecToJson(this);
|
Map<String, dynamic> toJson() => _$SizeSpecToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,34 +4,34 @@ part 'badge.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Badge {
|
class Badge {
|
||||||
String? text;
|
String? text;
|
||||||
@JsonKey(name: 'text_color')
|
@JsonKey(name: 'text_color')
|
||||||
String? textColor;
|
String? textColor;
|
||||||
@JsonKey(name: 'text_color_night')
|
@JsonKey(name: 'text_color_night')
|
||||||
String? textColorNight;
|
String? textColorNight;
|
||||||
@JsonKey(name: 'bg_color')
|
@JsonKey(name: 'bg_color')
|
||||||
String? bgColor;
|
String? bgColor;
|
||||||
@JsonKey(name: 'bg_color_night')
|
@JsonKey(name: 'bg_color_night')
|
||||||
String? bgColorNight;
|
String? bgColorNight;
|
||||||
@JsonKey(name: 'border_color')
|
@JsonKey(name: 'border_color')
|
||||||
String? borderColor;
|
String? borderColor;
|
||||||
@JsonKey(name: 'border_color_night')
|
@JsonKey(name: 'border_color_night')
|
||||||
String? borderColorNight;
|
String? borderColorNight;
|
||||||
@JsonKey(name: 'bg_style')
|
@JsonKey(name: 'bg_style')
|
||||||
int? bgStyle;
|
int? bgStyle;
|
||||||
|
|
||||||
Badge({
|
Badge({
|
||||||
this.text,
|
this.text,
|
||||||
this.textColor,
|
this.textColor,
|
||||||
this.textColorNight,
|
this.textColorNight,
|
||||||
this.bgColor,
|
this.bgColor,
|
||||||
this.bgColorNight,
|
this.bgColorNight,
|
||||||
this.borderColor,
|
this.borderColor,
|
||||||
this.borderColorNight,
|
this.borderColorNight,
|
||||||
this.bgStyle,
|
this.bgStyle,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Badge.fromJson(Map<String, dynamic> json) => _$BadgeFromJson(json);
|
factory Badge.fromJson(Map<String, dynamic> json) => _$BadgeFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$BadgeToJson(this);
|
Map<String, dynamic> toJson() => _$BadgeToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,15 +4,15 @@ part 'cursor_attr.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class CursorAttr {
|
class CursorAttr {
|
||||||
@JsonKey(name: 'is_last_watched_arc')
|
@JsonKey(name: 'is_last_watched_arc')
|
||||||
bool? isLastWatchedArc;
|
bool? isLastWatchedArc;
|
||||||
int? rank;
|
int? rank;
|
||||||
|
|
||||||
CursorAttr({this.isLastWatchedArc, this.rank});
|
CursorAttr({this.isLastWatchedArc, this.rank});
|
||||||
|
|
||||||
factory CursorAttr.fromJson(Map<String, dynamic> json) {
|
factory CursorAttr.fromJson(Map<String, dynamic> json) {
|
||||||
return _$CursorAttrFromJson(json);
|
return _$CursorAttrFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$CursorAttrToJson(this);
|
Map<String, dynamic> toJson() => _$CursorAttrToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'episodic_button.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class EpisodicButton {
|
class EpisodicButton {
|
||||||
String? text;
|
String? text;
|
||||||
String? uri;
|
String? uri;
|
||||||
|
|
||||||
EpisodicButton({this.text, this.uri});
|
EpisodicButton({this.text, this.uri});
|
||||||
|
|
||||||
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
|
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
|
||||||
return _$EpisodicButtonFromJson(json);
|
return _$EpisodicButtonFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$EpisodicButtonToJson(this);
|
Map<String, dynamic> toJson() => _$EpisodicButtonToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,21 +4,21 @@ part 'last_watched_locator.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class LastWatchedLocator {
|
class LastWatchedLocator {
|
||||||
@JsonKey(name: 'display_threshold')
|
@JsonKey(name: 'display_threshold')
|
||||||
int? displayThreshold;
|
int? displayThreshold;
|
||||||
@JsonKey(name: 'insert_ranking')
|
@JsonKey(name: 'insert_ranking')
|
||||||
int? insertRanking;
|
int? insertRanking;
|
||||||
String? text;
|
String? text;
|
||||||
|
|
||||||
LastWatchedLocator({
|
LastWatchedLocator({
|
||||||
this.displayThreshold,
|
this.displayThreshold,
|
||||||
this.insertRanking,
|
this.insertRanking,
|
||||||
this.text,
|
this.text,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory LastWatchedLocator.fromJson(Map<String, dynamic> json) {
|
factory LastWatchedLocator.fromJson(Map<String, dynamic> json) {
|
||||||
return _$LastWatchedLocatorFromJson(json);
|
return _$LastWatchedLocatorFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$LastWatchedLocatorToJson(this);
|
Map<String, dynamic> toJson() => _$LastWatchedLocatorToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ part 'order.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Order {
|
class Order {
|
||||||
String? title;
|
String? title;
|
||||||
String? value;
|
String? value;
|
||||||
|
|
||||||
Order({this.title, this.value});
|
Order({this.title, this.value});
|
||||||
|
|
||||||
factory Order.fromJson(Map<String, dynamic> json) => _$OrderFromJson(json);
|
factory Order.fromJson(Map<String, dynamic> json) => _$OrderFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$OrderToJson(this);
|
Map<String, dynamic> toJson() => _$OrderToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ part 'category.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Category {
|
class Category {
|
||||||
int? id;
|
int? id;
|
||||||
@JsonKey(name: 'parent_id')
|
@JsonKey(name: 'parent_id')
|
||||||
int? parentId;
|
int? parentId;
|
||||||
String? name;
|
String? name;
|
||||||
|
|
||||||
Category({this.id, this.parentId, this.name});
|
Category({this.id, this.parentId, this.name});
|
||||||
|
|
||||||
factory Category.fromJson(Map<String, dynamic> json) {
|
factory Category.fromJson(Map<String, dynamic> json) {
|
||||||
return _$CategoryFromJson(json);
|
return _$CategoryFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$CategoryToJson(this);
|
Map<String, dynamic> toJson() => _$CategoryToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import 'package:PiliPlus/models/dynamics/article_content_model.dart';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:PiliPlus/models/dynamics/article_content_model.dart';
|
||||||
|
import 'package:PiliPlus/models/dynamics/article_opus/opus.dart';
|
||||||
import 'package:PiliPlus/models/space_article/author.dart';
|
import 'package:PiliPlus/models/space_article/author.dart';
|
||||||
import 'package:PiliPlus/models/space_article/category.dart';
|
import 'package:PiliPlus/models/space_article/category.dart';
|
||||||
import 'package:PiliPlus/models/space_article/media.dart';
|
import 'package:PiliPlus/models/space_article/media.dart';
|
||||||
@@ -55,6 +57,7 @@ class SpaceArticleItem {
|
|||||||
int? versionId;
|
int? versionId;
|
||||||
String? dynIdStr;
|
String? dynIdStr;
|
||||||
int? totalArtNum;
|
int? totalArtNum;
|
||||||
|
List<ReadOpusModel>? ops;
|
||||||
|
|
||||||
SpaceArticleItem.fromJson(Map<String, dynamic> json) {
|
SpaceArticleItem.fromJson(Map<String, dynamic> json) {
|
||||||
id = json["id"];
|
id = json["id"];
|
||||||
@@ -105,8 +108,13 @@ class SpaceArticleItem {
|
|||||||
keywords = json["keywords"];
|
keywords = json["keywords"];
|
||||||
if (json['opus'] != null) opus = Opus.fromJson(json['opus']);
|
if (json['opus'] != null) opus = Opus.fromJson(json['opus']);
|
||||||
versionId = json["version_id"];
|
versionId = json["version_id"];
|
||||||
dynIdStr = json["dyn_id_str"];
|
dynIdStr = json["dyn_id_str"] == '' ? null : json["dyn_id_str"];
|
||||||
totalArtNum = json["total_art_num"];
|
totalArtNum = json["total_art_num"];
|
||||||
|
if (type == 3 && content != null) {
|
||||||
|
ops = (jsonDecode(content!)['ops'] as List?)
|
||||||
|
?.map((e) => ReadOpusModel.fromJson(e))
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ part 'label.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Label {
|
class Label {
|
||||||
String? path;
|
String? path;
|
||||||
String? text;
|
String? text;
|
||||||
@JsonKey(name: 'label_theme')
|
@JsonKey(name: 'label_theme')
|
||||||
String? labelTheme;
|
String? labelTheme;
|
||||||
|
|
||||||
Label({this.path, this.text, this.labelTheme});
|
Label({this.path, this.text, this.labelTheme});
|
||||||
|
|
||||||
factory Label.fromJson(Map<String, dynamic> json) => _$LabelFromJson(json);
|
factory Label.fromJson(Map<String, dynamic> json) => _$LabelFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$LabelToJson(this);
|
Map<String, dynamic> toJson() => _$LabelToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,30 +4,30 @@ part 'media.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Media {
|
class Media {
|
||||||
int? score;
|
int? score;
|
||||||
@JsonKey(name: 'media_id')
|
@JsonKey(name: 'media_id')
|
||||||
int? mediaId;
|
int? mediaId;
|
||||||
String? title;
|
String? title;
|
||||||
String? cover;
|
String? cover;
|
||||||
String? area;
|
String? area;
|
||||||
@JsonKey(name: 'type_id')
|
@JsonKey(name: 'type_id')
|
||||||
int? typeId;
|
int? typeId;
|
||||||
@JsonKey(name: 'type_name')
|
@JsonKey(name: 'type_name')
|
||||||
String? typeName;
|
String? typeName;
|
||||||
int? spoiler;
|
int? spoiler;
|
||||||
|
|
||||||
Media({
|
Media({
|
||||||
this.score,
|
this.score,
|
||||||
this.mediaId,
|
this.mediaId,
|
||||||
this.title,
|
this.title,
|
||||||
this.cover,
|
this.cover,
|
||||||
this.area,
|
this.area,
|
||||||
this.typeId,
|
this.typeId,
|
||||||
this.typeName,
|
this.typeName,
|
||||||
this.spoiler,
|
this.spoiler,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Media.fromJson(Map<String, dynamic> json) => _$MediaFromJson(json);
|
factory Media.fromJson(Map<String, dynamic> json) => _$MediaFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$MediaToJson(this);
|
Map<String, dynamic> toJson() => _$MediaToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,26 +4,26 @@ part 'nameplate.g.dart';
|
|||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class Nameplate {
|
class Nameplate {
|
||||||
int? nid;
|
int? nid;
|
||||||
String? name;
|
String? name;
|
||||||
String? image;
|
String? image;
|
||||||
@JsonKey(name: 'image_small')
|
@JsonKey(name: 'image_small')
|
||||||
String? imageSmall;
|
String? imageSmall;
|
||||||
String? level;
|
String? level;
|
||||||
String? condition;
|
String? condition;
|
||||||
|
|
||||||
Nameplate({
|
Nameplate({
|
||||||
this.nid,
|
this.nid,
|
||||||
this.name,
|
this.name,
|
||||||
this.image,
|
this.image,
|
||||||
this.imageSmall,
|
this.imageSmall,
|
||||||
this.level,
|
this.level,
|
||||||
this.condition,
|
this.condition,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Nameplate.fromJson(Map<String, dynamic> json) {
|
factory Nameplate.fromJson(Map<String, dynamic> json) {
|
||||||
return _$NameplateFromJson(json);
|
return _$NameplateFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$NameplateToJson(this);
|
Map<String, dynamic> toJson() => _$NameplateToJson(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
class Stat {
|
class Stat {
|
||||||
String? like;
|
String? like;
|
||||||
|
|
||||||
Stat({this.like});
|
Stat({this.like});
|
||||||
|
|
||||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||||
like: json['like'] as String?,
|
like: json['like'] as String?,
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
'like': like,
|
'like': like,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import 'package:PiliPlus/models/dynamics/result.dart' show DynamicStat;
|
|||||||
import 'package:PiliPlus/pages/article/controller.dart';
|
import 'package:PiliPlus/pages/article/controller.dart';
|
||||||
import 'package:PiliPlus/pages/article/widgets/html_render.dart';
|
import 'package:PiliPlus/pages/article/widgets/html_render.dart';
|
||||||
import 'package:PiliPlus/pages/article/widgets/opus_content.dart';
|
import 'package:PiliPlus/pages/article/widgets/opus_content.dart';
|
||||||
|
import 'package:PiliPlus/pages/article/widgets/read_opus.dart';
|
||||||
import 'package:PiliPlus/pages/dynamics_repost/view.dart';
|
import 'package:PiliPlus/pages/dynamics_repost/view.dart';
|
||||||
import 'package:PiliPlus/pages/video/reply/widgets/reply_item_grpc.dart';
|
import 'package:PiliPlus/pages/video/reply/widgets/reply_item_grpc.dart';
|
||||||
import 'package:PiliPlus/pages/video/reply_reply/view.dart';
|
import 'package:PiliPlus/pages/video/reply_reply/view.dart';
|
||||||
@@ -360,6 +361,10 @@ class _ArticlePageState extends State<ArticlePage>
|
|||||||
child: moduleBlockedItem(theme, moduleBlocked, maxWidth),
|
child: moduleBlockedItem(theme, moduleBlocked, maxWidth),
|
||||||
);
|
);
|
||||||
} else if (_articleCtr.articleData?.content != null) {
|
} else if (_articleCtr.articleData?.content != null) {
|
||||||
|
if (_articleCtr.articleData?.type == 3) {
|
||||||
|
// json
|
||||||
|
return ReadOpus(ops: _articleCtr.articleData?.ops);
|
||||||
|
}
|
||||||
debugPrint('html page');
|
debugPrint('html page');
|
||||||
final res = parser.parse(_articleCtr.articleData!.content!);
|
final res = parser.parse(_articleCtr.articleData!.content!);
|
||||||
if (res.body!.children.isEmpty) {
|
if (res.body!.children.isEmpty) {
|
||||||
|
|||||||
77
lib/pages/article/widgets/read_opus.dart
Normal file
77
lib/pages/article/widgets/read_opus.dart
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
|
import 'package:PiliPlus/models/dynamics/article_opus/opus.dart';
|
||||||
|
import 'package:PiliPlus/pages/dynamics/widgets/vote.dart';
|
||||||
|
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||||
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class ReadOpus extends StatelessWidget {
|
||||||
|
const ReadOpus({super.key, required this.ops});
|
||||||
|
|
||||||
|
final List<ReadOpusModel>? ops;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (ops.isNullOrEmpty) {
|
||||||
|
return const SliverToBoxAdapter();
|
||||||
|
}
|
||||||
|
|
||||||
|
return SliverList.separated(
|
||||||
|
itemCount: ops!.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
try {
|
||||||
|
final item = ops![index];
|
||||||
|
if (item.insert is String) {
|
||||||
|
return SelectableText(item.insert);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.insert is Insert) {
|
||||||
|
InsertCard card = item.insert.card;
|
||||||
|
if (card.url?.isNotEmpty == true) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
switch (item.attributes?.clazz) {
|
||||||
|
case 'article-card card':
|
||||||
|
if (card.id != null) {
|
||||||
|
Get.toNamed(
|
||||||
|
'/articlePage',
|
||||||
|
parameters: {
|
||||||
|
'id': card.id!.substring(2),
|
||||||
|
'type': 'read',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
case 'video-card card':
|
||||||
|
if (card.id != null) {
|
||||||
|
PiliScheme.videoPush(null, card.id);
|
||||||
|
}
|
||||||
|
case 'vote-card card':
|
||||||
|
if (card.id != null) {
|
||||||
|
showVoteDialog(context, card.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: StyleString.mdRadius,
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
imageUrl: Utils.thumbnailImgUrl(card.url, 60),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Text('${item.attributes}');
|
||||||
|
} catch (e) {
|
||||||
|
return Text(e.toString());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
separatorBuilder: (context, index) {
|
||||||
|
return const SizedBox(height: 10);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -171,7 +171,7 @@ class _DynamicsPageState extends State<DynamicsPage>
|
|||||||
children: [
|
children: [
|
||||||
if (upPanelPosition == UpPanelPosition.top) upPanelPart(theme),
|
if (upPanelPosition == UpPanelPosition.top) upPanelPart(theme),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: tabBarView(
|
child: videoTabBarView(
|
||||||
controller: _dynamicsController.tabController,
|
controller: _dynamicsController.tabController,
|
||||||
children: _dynamicsController.tabsPageList,
|
children: _dynamicsController.tabsPageList,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user