Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-17 18:08:55 +08:00
parent 906c21e252
commit 1d4eabb770
58 changed files with 875 additions and 684 deletions

View File

@@ -1,35 +1,35 @@
import 'package:PiliPlus/models/bangumi/pgc_timeline/episode.dart';
class Result {
String? date;
int? dateTs;
int? dayOfWeek;
List<Episode>? episodes;
int? isToday;
String? date;
int? dateTs;
int? dayOfWeek;
List<Episode>? episodes;
int? isToday;
Result({
this.date,
this.dateTs,
this.dayOfWeek,
this.episodes,
this.isToday,
});
Result({
this.date,
this.dateTs,
this.dayOfWeek,
this.episodes,
this.isToday,
});
factory Result.fromJson(Map<String, dynamic> json) => Result(
date: json['date'] as String?,
dateTs: json['date_ts'] as int?,
dayOfWeek: json['day_of_week'] as int?,
episodes: (json['episodes'] as List<dynamic>?)
?.map((e) => Episode.fromJson(e as Map<String, dynamic>))
.toList(),
isToday: json['is_today'] as int?,
);
factory Result.fromJson(Map<String, dynamic> json) => Result(
date: json['date'] as String?,
dateTs: json['date_ts'] as int?,
dayOfWeek: json['day_of_week'] as int?,
episodes: (json['episodes'] as List<dynamic>?)
?.map((e) => Episode.fromJson(e as Map<String, dynamic>))
.toList(),
isToday: json['is_today'] as int?,
);
Map<String, dynamic> toJson() => {
'date': date,
'date_ts': dateTs,
'day_of_week': dayOfWeek,
'episodes': episodes?.map((e) => e.toJson()).toList(),
'is_today': isToday,
};
Map<String, dynamic> toJson() => {
'date': date,
'date_ts': dateTs,
'day_of_week': dayOfWeek,
'episodes': episodes?.map((e) => e.toJson()).toList(),
'is_today': isToday,
};
}

View 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?,
);
}

View 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'];
}
}

View File

@@ -1,16 +1,16 @@
class AllSortBy {
int? sortBy;
String? sortName;
int? sortBy;
String? sortName;
AllSortBy({this.sortBy, this.sortName});
AllSortBy({this.sortBy, this.sortName});
factory AllSortBy.fromJson(Map<String, dynamic> json) => AllSortBy(
sortBy: json['sort_by'] as int?,
sortName: json['sort_name'] as String?,
);
factory AllSortBy.fromJson(Map<String, dynamic> json) => AllSortBy(
sortBy: json['sort_by'] as int?,
sortName: json['sort_name'] as String?,
);
Map<String, dynamic> toJson() => {
'sort_by': sortBy,
'sort_name': sortName,
};
Map<String, dynamic> toJson() => {
'sort_by': sortBy,
'sort_name': sortName,
};
}

View File

@@ -1,63 +1,63 @@
class TopicItem {
int? id;
String? name;
int? view;
int? discuss;
int? fav;
int? dynamics;
String? jumpUrl;
String? backColor;
String? description;
String? sharePic;
String? shareUrl;
int? ctime;
bool? showInteractData;
int? id;
String? name;
int? view;
int? discuss;
int? fav;
int? dynamics;
String? jumpUrl;
String? backColor;
String? description;
String? sharePic;
String? shareUrl;
int? ctime;
bool? showInteractData;
TopicItem({
this.id,
this.name,
this.view,
this.discuss,
this.fav,
this.dynamics,
this.jumpUrl,
this.backColor,
this.description,
this.sharePic,
this.shareUrl,
this.ctime,
this.showInteractData,
});
TopicItem({
this.id,
this.name,
this.view,
this.discuss,
this.fav,
this.dynamics,
this.jumpUrl,
this.backColor,
this.description,
this.sharePic,
this.shareUrl,
this.ctime,
this.showInteractData,
});
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
id: json['id'] as int?,
name: json['name'] as String?,
view: json['view'] as int?,
discuss: json['discuss'] as int?,
fav: json['fav'] as int?,
dynamics: json['dynamics'] as int?,
jumpUrl: json['jump_url'] as String?,
backColor: json['back_color'] as String?,
description: json['description'] as String?,
sharePic: json['share_pic'] as String?,
shareUrl: json['share_url'] as String?,
ctime: json['ctime'] as int?,
showInteractData: json['show_interact_data'] as bool?,
);
factory TopicItem.fromJson(Map<String, dynamic> json) => TopicItem(
id: json['id'] as int?,
name: json['name'] as String?,
view: json['view'] as int?,
discuss: json['discuss'] as int?,
fav: json['fav'] as int?,
dynamics: json['dynamics'] as int?,
jumpUrl: json['jump_url'] as String?,
backColor: json['back_color'] as String?,
description: json['description'] as String?,
sharePic: json['share_pic'] as String?,
shareUrl: json['share_url'] as String?,
ctime: json['ctime'] as int?,
showInteractData: json['show_interact_data'] as bool?,
);
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'view': view,
'discuss': discuss,
'fav': fav,
'dynamics': dynamics,
'jump_url': jumpUrl,
'back_color': backColor,
'description': description,
'share_pic': sharePic,
'share_url': shareUrl,
'ctime': ctime,
'show_interact_data': showInteractData,
};
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'view': view,
'discuss': discuss,
'fav': fav,
'dynamics': dynamics,
'jump_url': jumpUrl,
'back_color': backColor,
'description': description,
'share_pic': sharePic,
'share_url': shareUrl,
'ctime': ctime,
'show_interact_data': showInteractData,
};
}

View File

@@ -1,16 +1,16 @@
class TopLeft {
String? image;
String? text;
String? image;
String? text;
TopLeft({this.image, this.text});
TopLeft({this.image, this.text});
factory TopLeft.fromJson(Map<String, dynamic> json) => TopLeft(
image: json['image'] as String?,
text: json['text'] as String?,
);
factory TopLeft.fromJson(Map<String, dynamic> json) => TopLeft(
image: json['image'] as String?,
text: json['text'] as String?,
);
Map<String, dynamic> toJson() => {
'image': image,
'text': text,
};
Map<String, dynamic> toJson() => {
'image': image,
'text': text,
};
}

View File

@@ -1,16 +1,16 @@
class TopRight {
String? image;
String? text;
String? image;
String? text;
TopRight({this.image, this.text});
TopRight({this.image, this.text});
factory TopRight.fromJson(Map<String, dynamic> json) => TopRight(
image: json['image'] as String?,
text: json['text'] as String?,
);
factory TopRight.fromJson(Map<String, dynamic> json) => TopRight(
image: json['image'] as String?,
text: json['text'] as String?,
);
Map<String, dynamic> toJson() => {
'image': image,
'text': text,
};
Map<String, dynamic> toJson() => {
'image': image,
'text': text,
};
}

View File

@@ -2,22 +2,22 @@ import 'package:PiliPlus/models/live/live_emoticons/top_left.dart';
import 'package:PiliPlus/models/live/live_emoticons/top_right.dart';
class TopShow {
TopLeft? topLeft;
TopRight? topRight;
TopLeft? topLeft;
TopRight? topRight;
TopShow({this.topLeft, this.topRight});
TopShow({this.topLeft, this.topRight});
factory TopShow.fromJson(Map<String, dynamic> json) => TopShow(
topLeft: json['top_left'] == null
? null
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
topRight: json['top_right'] == null
? null
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
);
factory TopShow.fromJson(Map<String, dynamic> json) => TopShow(
topLeft: json['top_left'] == null
? null
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
topRight: json['top_right'] == null
? null
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
);
Map<String, dynamic> toJson() => {
'top_left': topLeft?.toJson(),
'top_right': topRight?.toJson(),
};
Map<String, dynamic> toJson() => {
'top_left': topLeft?.toJson(),
'top_right': topRight?.toJson(),
};
}

View File

@@ -2,22 +2,22 @@ import 'package:PiliPlus/models/live/live_emoticons/top_left.dart';
import 'package:PiliPlus/models/live/live_emoticons/top_right.dart';
class TopShowRecent {
TopLeft? topLeft;
TopRight? topRight;
TopLeft? topLeft;
TopRight? topRight;
TopShowRecent({this.topLeft, this.topRight});
TopShowRecent({this.topLeft, this.topRight});
factory TopShowRecent.fromJson(Map<String, dynamic> json) => TopShowRecent(
topLeft: json['top_left'] == null
? null
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
topRight: json['top_right'] == null
? null
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
);
factory TopShowRecent.fromJson(Map<String, dynamic> json) => TopShowRecent(
topLeft: json['top_left'] == null
? null
: TopLeft.fromJson(json['top_left'] as Map<String, dynamic>),
topRight: json['top_right'] == null
? null
: TopRight.fromJson(json['top_right'] as Map<String, dynamic>),
);
Map<String, dynamic> toJson() => {
'top_left': topLeft?.toJson(),
'top_right': topRight?.toJson(),
};
Map<String, dynamic> toJson() => {
'top_left': topLeft?.toJson(),
'top_right': topRight?.toJson(),
};
}

View File

@@ -1,39 +1,39 @@
class ModuleInfo {
int? id;
String? link;
String? pic;
String? title;
int? type;
int? sort;
int? count;
int? id;
String? link;
String? pic;
String? title;
int? type;
int? sort;
int? count;
ModuleInfo({
this.id,
this.link,
this.pic,
this.title,
this.type,
this.sort,
this.count,
});
ModuleInfo({
this.id,
this.link,
this.pic,
this.title,
this.type,
this.sort,
this.count,
});
factory ModuleInfo.fromJson(Map<String, dynamic> json) => ModuleInfo(
id: json['id'] as int?,
link: json['link'] as String?,
pic: json['pic'] as String?,
title: json['title'] as String?,
type: json['type'] as int?,
sort: json['sort'] as int?,
count: json['count'] as int?,
);
factory ModuleInfo.fromJson(Map<String, dynamic> json) => ModuleInfo(
id: json['id'] as int?,
link: json['link'] as String?,
pic: json['pic'] as String?,
title: json['title'] as String?,
type: json['type'] as int?,
sort: json['sort'] as int?,
count: json['count'] as int?,
);
Map<String, dynamic> toJson() => {
'id': id,
'link': link,
'pic': pic,
'title': title,
'type': type,
'sort': sort,
'count': count,
};
Map<String, dynamic> toJson() => {
'id': id,
'link': link,
'pic': pic,
'title': title,
'type': type,
'sort': sort,
'count': count,
};
}

View File

@@ -4,17 +4,17 @@ part 'achieve.g.dart';
@JsonSerializable()
class Achieve {
@JsonKey(name: 'is_default')
bool? isDefault;
String? image;
@JsonKey(name: 'achieve_url')
String? achieveUrl;
@JsonKey(name: 'is_default')
bool? isDefault;
String? image;
@JsonKey(name: 'achieve_url')
String? achieveUrl;
Achieve({this.isDefault, this.image, this.achieveUrl});
Achieve({this.isDefault, this.image, this.achieveUrl});
factory Achieve.fromJson(Map<String, dynamic> json) {
return _$AchieveFromJson(json);
}
factory Achieve.fromJson(Map<String, dynamic> json) {
return _$AchieveFromJson(json);
}
Map<String, dynamic> toJson() => _$AchieveToJson(this);
Map<String, dynamic> toJson() => _$AchieveToJson(this);
}

View File

@@ -4,17 +4,17 @@ part 'article.g.dart';
@JsonSerializable()
class Article {
int? count;
List<dynamic>? item;
@JsonKey(name: 'lists_count')
int? listsCount;
List<dynamic>? lists;
int? count;
List<dynamic>? item;
@JsonKey(name: 'lists_count')
int? listsCount;
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) {
return _$ArticleFromJson(json);
}
factory Article.fromJson(Map<String, dynamic> json) {
return _$ArticleFromJson(json);
}
Map<String, dynamic> toJson() => _$ArticleToJson(this);
Map<String, dynamic> toJson() => _$ArticleToJson(this);
}

View File

@@ -4,15 +4,15 @@ part 'attention_tip.g.dart';
@JsonSerializable()
class AttentionTip {
@JsonKey(name: 'card_num')
int? cardNum;
String? tip;
@JsonKey(name: 'card_num')
int? cardNum;
String? tip;
AttentionTip({this.cardNum, this.tip});
AttentionTip({this.cardNum, this.tip});
factory AttentionTip.fromJson(Map<String, dynamic> json) {
return _$AttentionTipFromJson(json);
}
factory AttentionTip.fromJson(Map<String, dynamic> json) {
return _$AttentionTipFromJson(json);
}
Map<String, dynamic> toJson() => _$AttentionTipToJson(this);
Map<String, dynamic> toJson() => _$AttentionTipToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'audios.g.dart';
@JsonSerializable()
class Audios {
int? count;
List<dynamic>? item;
int? count;
List<dynamic>? item;
Audios({this.count, this.item});
Audios({this.count, this.item});
factory Audios.fromJson(Map<String, dynamic> json) {
return _$AudiosFromJson(json);
}
factory Audios.fromJson(Map<String, dynamic> json) {
return _$AudiosFromJson(json);
}
Map<String, dynamic> toJson() => _$AudiosToJson(this);
Map<String, dynamic> toJson() => _$AudiosToJson(this);
}

View File

@@ -7,17 +7,17 @@ part 'avatar.g.dart';
@JsonSerializable()
class Avatar {
@JsonKey(name: 'container_size')
ContainerSize? containerSize;
@JsonKey(name: 'fallback_layers')
FallbackLayers? fallbackLayers;
String? mid;
@JsonKey(name: 'container_size')
ContainerSize? containerSize;
@JsonKey(name: 'fallback_layers')
FallbackLayers? fallbackLayers;
String? mid;
Avatar({this.containerSize, this.fallbackLayers, this.mid});
Avatar({this.containerSize, this.fallbackLayers, this.mid});
factory Avatar.fromJson(Map<String, dynamic> json) {
return _$AvatarFromJson(json);
}
factory Avatar.fromJson(Map<String, dynamic> json) {
return _$AvatarFromJson(json);
}
Map<String, dynamic> toJson() => _$AvatarToJson(this);
Map<String, dynamic> toJson() => _$AvatarToJson(this);
}

View File

@@ -7,16 +7,16 @@ part 'color_config.g.dart';
@JsonSerializable()
class ColorConfig {
@JsonKey(name: 'is_dark_mode_aware')
bool? isDarkModeAware;
Day? day;
Night? night;
@JsonKey(name: 'is_dark_mode_aware')
bool? isDarkModeAware;
Day? day;
Night? night;
ColorConfig({this.isDarkModeAware, this.day, this.night});
ColorConfig({this.isDarkModeAware, this.day, this.night});
factory ColorConfig.fromJson(Map<String, dynamic> json) {
return _$ColorConfigFromJson(json);
}
factory ColorConfig.fromJson(Map<String, dynamic> json) {
return _$ColorConfigFromJson(json);
}
Map<String, dynamic> toJson() => _$ColorConfigToJson(this);
Map<String, dynamic> toJson() => _$ColorConfigToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'colour.g.dart';
@JsonSerializable()
class Colour {
String? dark;
String? normal;
String? dark;
String? normal;
Colour({this.dark, this.normal});
Colour({this.dark, this.normal});
factory Colour.fromJson(Map<String, dynamic> json) {
return _$ColourFromJson(json);
}
factory Colour.fromJson(Map<String, dynamic> json) {
return _$ColourFromJson(json);
}
Map<String, dynamic> toJson() => _$ColourToJson(this);
Map<String, dynamic> toJson() => _$ColourToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'container_size.g.dart';
@JsonSerializable()
class ContainerSize {
double? width;
double? height;
double? width;
double? height;
ContainerSize({this.width, this.height});
ContainerSize({this.width, this.height});
factory ContainerSize.fromJson(Map<String, dynamic> json) {
return _$ContainerSizeFromJson(json);
}
factory ContainerSize.fromJson(Map<String, dynamic> json) {
return _$ContainerSizeFromJson(json);
}
Map<String, dynamic> toJson() => _$ContainerSizeToJson(this);
Map<String, dynamic> toJson() => _$ContainerSizeToJson(this);
}

View File

@@ -4,11 +4,11 @@ part 'day.g.dart';
@JsonSerializable()
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);
}

View File

@@ -4,44 +4,44 @@ part 'digital_info.g.dart';
@JsonSerializable()
class DigitalInfo {
bool? active;
@JsonKey(name: 'nft_type')
int? nftType;
@JsonKey(name: 'background_handle')
int? backgroundHandle;
@JsonKey(name: 'animation_first_frame')
String? animationFirstFrame;
@JsonKey(name: 'music_album')
dynamic musicAlbum;
dynamic animation;
@JsonKey(name: 'nft_region_title')
String? nftRegionTitle;
@JsonKey(name: 'card_id')
int? cardId;
@JsonKey(name: 'cut_space_bg')
String? cutSpaceBg;
@JsonKey(name: 'part_type')
int? partType;
@JsonKey(name: 'item_jump_url')
String? itemJumpUrl;
bool? active;
@JsonKey(name: 'nft_type')
int? nftType;
@JsonKey(name: 'background_handle')
int? backgroundHandle;
@JsonKey(name: 'animation_first_frame')
String? animationFirstFrame;
@JsonKey(name: 'music_album')
dynamic musicAlbum;
dynamic animation;
@JsonKey(name: 'nft_region_title')
String? nftRegionTitle;
@JsonKey(name: 'card_id')
int? cardId;
@JsonKey(name: 'cut_space_bg')
String? cutSpaceBg;
@JsonKey(name: 'part_type')
int? partType;
@JsonKey(name: 'item_jump_url')
String? itemJumpUrl;
DigitalInfo({
this.active,
this.nftType,
this.backgroundHandle,
this.animationFirstFrame,
this.musicAlbum,
this.animation,
this.nftRegionTitle,
this.cardId,
this.cutSpaceBg,
this.partType,
this.itemJumpUrl,
});
DigitalInfo({
this.active,
this.nftType,
this.backgroundHandle,
this.animationFirstFrame,
this.musicAlbum,
this.animation,
this.nftRegionTitle,
this.cardId,
this.cutSpaceBg,
this.partType,
this.itemJumpUrl,
});
factory DigitalInfo.fromJson(Map<String, dynamic> json) {
return _$DigitalInfoFromJson(json);
}
factory DigitalInfo.fromJson(Map<String, dynamic> json) {
return _$DigitalInfoFromJson(json);
}
Map<String, dynamic> toJson() => _$DigitalInfoToJson(this);
Map<String, dynamic> toJson() => _$DigitalInfoToJson(this);
}

View File

@@ -6,16 +6,16 @@ part 'draw.g.dart';
@JsonSerializable()
class Draw {
@JsonKey(name: 'draw_type')
int? drawType;
@JsonKey(name: 'fill_mode')
int? fillMode;
@JsonKey(name: 'color_config')
ColorConfig? colorConfig;
@JsonKey(name: 'draw_type')
int? drawType;
@JsonKey(name: 'fill_mode')
int? fillMode;
@JsonKey(name: 'color_config')
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);
}

View File

@@ -6,15 +6,15 @@ part 'draw_src.g.dart';
@JsonSerializable()
class DrawSrc {
@JsonKey(name: 'src_type')
int? srcType;
Draw? draw;
@JsonKey(name: 'src_type')
int? srcType;
Draw? draw;
DrawSrc({this.srcType, this.draw});
DrawSrc({this.srcType, this.draw});
factory DrawSrc.fromJson(Map<String, dynamic> json) {
return _$DrawSrcFromJson(json);
}
factory DrawSrc.fromJson(Map<String, dynamic> json) {
return _$DrawSrcFromJson(json);
}
Map<String, dynamic> toJson() => _$DrawSrcToJson(this);
Map<String, dynamic> toJson() => _$DrawSrcToJson(this);
}

View File

@@ -4,17 +4,17 @@ part 'entrance.g.dart';
@JsonSerializable()
class Entrance {
String? icon;
@JsonKey(name: 'jump_url')
String? jumpUrl;
@JsonKey(name: 'is_show_entrance')
bool? isShowEntrance;
String? icon;
@JsonKey(name: 'jump_url')
String? jumpUrl;
@JsonKey(name: 'is_show_entrance')
bool? isShowEntrance;
Entrance({this.icon, this.jumpUrl, this.isShowEntrance});
Entrance({this.icon, this.jumpUrl, this.isShowEntrance});
factory Entrance.fromJson(Map<String, dynamic> json) {
return _$EntranceFromJson(json);
}
factory Entrance.fromJson(Map<String, dynamic> json) {
return _$EntranceFromJson(json);
}
Map<String, dynamic> toJson() => _$EntranceToJson(this);
Map<String, dynamic> toJson() => _$EntranceToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'entrance_button.g.dart';
@JsonSerializable()
class EntranceButton {
String? uri;
String? title;
String? uri;
String? title;
EntranceButton({this.uri, this.title});
EntranceButton({this.uri, this.title});
factory EntranceButton.fromJson(Map<String, dynamic> json) {
return _$EntranceButtonFromJson(json);
}
factory EntranceButton.fromJson(Map<String, dynamic> json) {
return _$EntranceButtonFromJson(json);
}
Map<String, dynamic> toJson() => _$EntranceButtonToJson(this);
Map<String, dynamic> toJson() => _$EntranceButtonToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'episodic_button.g.dart';
@JsonSerializable()
class EpisodicButton {
String? text;
String? uri;
String? text;
String? uri;
EpisodicButton({this.text, this.uri});
EpisodicButton({this.text, this.uri});
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
return _$EpisodicButtonFromJson(json);
}
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
return _$EpisodicButtonFromJson(json);
}
Map<String, dynamic> toJson() => _$EpisodicButtonToJson(this);
Map<String, dynamic> toJson() => _$EpisodicButtonToJson(this);
}

View File

@@ -6,15 +6,15 @@ part 'fallback_layers.g.dart';
@JsonSerializable()
class FallbackLayers {
List<Layer>? layers;
@JsonKey(name: 'is_critical_group')
bool? isCriticalGroup;
List<Layer>? layers;
@JsonKey(name: 'is_critical_group')
bool? isCriticalGroup;
FallbackLayers({this.layers, this.isCriticalGroup});
FallbackLayers({this.layers, this.isCriticalGroup});
factory FallbackLayers.fromJson(Map<String, dynamic> json) {
return _$FallbackLayersFromJson(json);
}
factory FallbackLayers.fromJson(Map<String, dynamic> json) {
return _$FallbackLayersFromJson(json);
}
Map<String, dynamic> toJson() => _$FallbackLayersToJson(this);
Map<String, dynamic> toJson() => _$FallbackLayersToJson(this);
}

View File

@@ -8,18 +8,18 @@ part 'general_spec.g.dart';
@JsonSerializable()
class GeneralSpec {
@JsonKey(name: 'pos_spec')
PosSpec? posSpec;
@JsonKey(name: 'size_spec')
SizeSpec? sizeSpec;
@JsonKey(name: 'render_spec')
RenderSpec? renderSpec;
@JsonKey(name: 'pos_spec')
PosSpec? posSpec;
@JsonKey(name: 'size_spec')
SizeSpec? sizeSpec;
@JsonKey(name: 'render_spec')
RenderSpec? renderSpec;
GeneralSpec({this.posSpec, this.sizeSpec, this.renderSpec});
GeneralSpec({this.posSpec, this.sizeSpec, this.renderSpec});
factory GeneralSpec.fromJson(Map<String, dynamic> json) {
return _$GeneralSpecFromJson(json);
}
factory GeneralSpec.fromJson(Map<String, dynamic> json) {
return _$GeneralSpecFromJson(json);
}
Map<String, dynamic> toJson() => _$GeneralSpecToJson(this);
Map<String, dynamic> toJson() => _$GeneralSpecToJson(this);
}

View File

@@ -6,14 +6,14 @@ part 'honours.g.dart';
@JsonSerializable()
class Honours {
Colour? colour;
List<dynamic>? tags;
Colour? colour;
List<dynamic>? tags;
Honours({this.colour, this.tags});
Honours({this.colour, this.tags});
factory Honours.fromJson(Map<String, dynamic> json) {
return _$HonoursFromJson(json);
}
factory Honours.fromJson(Map<String, dynamic> json) {
return _$HonoursFromJson(json);
}
Map<String, dynamic> toJson() => _$HonoursToJson(this);
Map<String, dynamic> toJson() => _$HonoursToJson(this);
}

View File

@@ -8,16 +8,16 @@ part 'layer.g.dart';
@JsonSerializable()
class Layer {
bool? visible;
@JsonKey(name: 'general_spec')
GeneralSpec? generalSpec;
@JsonKey(name: 'layer_config')
LayerConfig? layerConfig;
Resource? resource;
bool? visible;
@JsonKey(name: 'general_spec')
GeneralSpec? generalSpec;
@JsonKey(name: 'layer_config')
LayerConfig? layerConfig;
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);
}

View File

@@ -6,30 +6,30 @@ part 'level_info.g.dart';
@JsonSerializable()
class LevelInfo {
@JsonKey(name: 'current_level')
int? currentLevel;
@JsonKey(name: 'current_min')
int? currentMin;
@JsonKey(name: 'current_exp')
int? currentExp;
@JsonKey(name: 'next_exp')
dynamic nextExp;
int? identity;
@JsonKey(name: 'senior_inquiry')
SeniorInquiry? seniorInquiry;
@JsonKey(name: 'current_level')
int? currentLevel;
@JsonKey(name: 'current_min')
int? currentMin;
@JsonKey(name: 'current_exp')
int? currentExp;
@JsonKey(name: 'next_exp')
dynamic nextExp;
int? identity;
@JsonKey(name: 'senior_inquiry')
SeniorInquiry? seniorInquiry;
LevelInfo({
this.currentLevel,
this.currentMin,
this.currentExp,
this.nextExp,
this.identity,
this.seniorInquiry,
});
LevelInfo({
this.currentLevel,
this.currentMin,
this.currentExp,
this.nextExp,
this.identity,
this.seniorInquiry,
});
factory LevelInfo.fromJson(Map<String, dynamic> json) {
return _$LevelInfoFromJson(json);
}
factory LevelInfo.fromJson(Map<String, dynamic> json) {
return _$LevelInfoFromJson(json);
}
Map<String, dynamic> toJson() => _$LevelInfoToJson(this);
Map<String, dynamic> toJson() => _$LevelInfoToJson(this);
}

View File

@@ -4,26 +4,26 @@ part 'nameplate.g.dart';
@JsonSerializable()
class Nameplate {
int? nid;
String? name;
String? image;
@JsonKey(name: 'image_small')
String? imageSmall;
String? level;
String? condition;
int? nid;
String? name;
String? image;
@JsonKey(name: 'image_small')
String? imageSmall;
String? level;
String? condition;
Nameplate({
this.nid,
this.name,
this.image,
this.imageSmall,
this.level,
this.condition,
});
Nameplate({
this.nid,
this.name,
this.image,
this.imageSmall,
this.level,
this.condition,
});
factory Nameplate.fromJson(Map<String, dynamic> json) {
return _$NameplateFromJson(json);
}
factory Nameplate.fromJson(Map<String, dynamic> json) {
return _$NameplateFromJson(json);
}
Map<String, dynamic> toJson() => _$NameplateToJson(this);
Map<String, dynamic> toJson() => _$NameplateToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'nft_certificate.g.dart';
@JsonSerializable()
class NftCertificate {
@JsonKey(name: 'detail_url')
String? detailUrl;
@JsonKey(name: 'detail_url')
String? detailUrl;
NftCertificate({this.detailUrl});
NftCertificate({this.detailUrl});
factory NftCertificate.fromJson(Map<String, dynamic> json) {
return _$NftCertificateFromJson(json);
}
factory NftCertificate.fromJson(Map<String, dynamic> json) {
return _$NftCertificateFromJson(json);
}
Map<String, dynamic> toJson() => _$NftCertificateToJson(this);
Map<String, dynamic> toJson() => _$NftCertificateToJson(this);
}

View File

@@ -4,11 +4,11 @@ part 'night.g.dart';
@JsonSerializable()
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);
}

View File

@@ -4,12 +4,12 @@ part 'order.g.dart';
@JsonSerializable()
class Order {
String? title;
String? value;
String? title;
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);
}

View File

@@ -4,18 +4,18 @@ part 'pos_spec.g.dart';
@JsonSerializable()
class PosSpec {
@JsonKey(name: 'coordinate_pos')
int? coordinatePos;
@JsonKey(name: 'axis_x')
double? axisX;
@JsonKey(name: 'axis_y')
double? axisY;
@JsonKey(name: 'coordinate_pos')
int? coordinatePos;
@JsonKey(name: 'axis_x')
double? axisX;
@JsonKey(name: 'axis_y')
double? axisY;
PosSpec({this.coordinatePos, this.axisX, this.axisY});
PosSpec({this.coordinatePos, this.axisX, this.axisY});
factory PosSpec.fromJson(Map<String, dynamic> json) {
return _$PosSpecFromJson(json);
}
factory PosSpec.fromJson(Map<String, dynamic> json) {
return _$PosSpecFromJson(json);
}
Map<String, dynamic> toJson() => _$PosSpecToJson(this);
Map<String, dynamic> toJson() => _$PosSpecToJson(this);
}

View File

@@ -4,15 +4,15 @@ part 'profession_verify.g.dart';
@JsonSerializable()
class ProfessionVerify {
String? icon;
@JsonKey(name: 'show_desc')
String? showDesc;
String? icon;
@JsonKey(name: 'show_desc')
String? showDesc;
ProfessionVerify({this.icon, this.showDesc});
ProfessionVerify({this.icon, this.showDesc});
factory ProfessionVerify.fromJson(Map<String, dynamic> json) {
return _$ProfessionVerifyFromJson(json);
}
factory ProfessionVerify.fromJson(Map<String, dynamic> json) {
return _$ProfessionVerifyFromJson(json);
}
Map<String, dynamic> toJson() => _$ProfessionVerifyToJson(this);
Map<String, dynamic> toJson() => _$ProfessionVerifyToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'purchase_button.g.dart';
@JsonSerializable()
class PurchaseButton {
String? uri;
String? title;
String? uri;
String? title;
PurchaseButton({this.uri, this.title});
PurchaseButton({this.uri, this.title});
factory PurchaseButton.fromJson(Map<String, dynamic> json) {
return _$PurchaseButtonFromJson(json);
}
factory PurchaseButton.fromJson(Map<String, dynamic> json) {
return _$PurchaseButtonFromJson(json);
}
Map<String, dynamic> toJson() => _$PurchaseButtonToJson(this);
Map<String, dynamic> toJson() => _$PurchaseButtonToJson(this);
}

View File

@@ -4,13 +4,13 @@ part 'render_spec.g.dart';
@JsonSerializable()
class RenderSpec {
int? opacity;
int? opacity;
RenderSpec({this.opacity});
RenderSpec({this.opacity});
factory RenderSpec.fromJson(Map<String, dynamic> json) {
return _$RenderSpecFromJson(json);
}
factory RenderSpec.fromJson(Map<String, dynamic> json) {
return _$RenderSpecFromJson(json);
}
Map<String, dynamic> toJson() => _$RenderSpecToJson(this);
Map<String, dynamic> toJson() => _$RenderSpecToJson(this);
}

View File

@@ -6,14 +6,14 @@ part 'res_native_draw.g.dart';
@JsonSerializable()
class ResNativeDraw {
@JsonKey(name: 'draw_src')
DrawSrc? drawSrc;
@JsonKey(name: 'draw_src')
DrawSrc? drawSrc;
ResNativeDraw({this.drawSrc});
ResNativeDraw({this.drawSrc});
factory ResNativeDraw.fromJson(Map<String, dynamic> json) {
return _$ResNativeDrawFromJson(json);
}
factory ResNativeDraw.fromJson(Map<String, dynamic> json) {
return _$ResNativeDrawFromJson(json);
}
Map<String, dynamic> toJson() => _$ResNativeDrawToJson(this);
Map<String, dynamic> toJson() => _$ResNativeDrawToJson(this);
}

View File

@@ -6,16 +6,16 @@ part 'resource.g.dart';
@JsonSerializable()
class Resource {
@JsonKey(name: 'res_type')
int? resType;
@JsonKey(name: 'res_native_draw')
ResNativeDraw? resNativeDraw;
@JsonKey(name: 'res_type')
int? resType;
@JsonKey(name: 'res_native_draw')
ResNativeDraw? resNativeDraw;
Resource({this.resType, this.resNativeDraw});
Resource({this.resType, this.resNativeDraw});
factory Resource.fromJson(Map<String, dynamic> json) {
return _$ResourceFromJson(json);
}
factory Resource.fromJson(Map<String, dynamic> json) {
return _$ResourceFromJson(json);
}
Map<String, dynamic> toJson() => _$ResourceToJson(this);
Map<String, dynamic> toJson() => _$ResourceToJson(this);
}

View File

@@ -4,16 +4,16 @@ part 'senior_inquiry.g.dart';
@JsonSerializable()
class SeniorInquiry {
@JsonKey(name: 'inquiry_text')
String? inquiryText;
@JsonKey(name: 'inquiry_url')
String? inquiryUrl;
@JsonKey(name: 'inquiry_text')
String? inquiryText;
@JsonKey(name: 'inquiry_url')
String? inquiryUrl;
SeniorInquiry({this.inquiryText, this.inquiryUrl});
SeniorInquiry({this.inquiryText, this.inquiryUrl});
factory SeniorInquiry.fromJson(Map<String, dynamic> json) {
return _$SeniorInquiryFromJson(json);
}
factory SeniorInquiry.fromJson(Map<String, dynamic> json) {
return _$SeniorInquiryFromJson(json);
}
Map<String, dynamic> toJson() => _$SeniorInquiryToJson(this);
Map<String, dynamic> toJson() => _$SeniorInquiryToJson(this);
}

View File

@@ -4,13 +4,13 @@ part 'series.g.dart';
@JsonSerializable()
class Series {
List<dynamic>? item;
List<dynamic>? item;
Series({this.item});
Series({this.item});
factory Series.fromJson(Map<String, dynamic> json) {
return _$SeriesFromJson(json);
}
factory Series.fromJson(Map<String, dynamic> json) {
return _$SeriesFromJson(json);
}
Map<String, dynamic> toJson() => _$SeriesToJson(this);
Map<String, dynamic> toJson() => _$SeriesToJson(this);
}

View File

@@ -4,65 +4,65 @@ part 'setting.g.dart';
@JsonSerializable()
class Setting {
int? channel;
@JsonKey(name: 'fav_video')
int? favVideo;
@JsonKey(name: 'coins_video')
int? coinsVideo;
@JsonKey(name: 'likes_video')
int? likesVideo;
int? bangumi;
@JsonKey(name: 'played_game')
int? playedGame;
int? groups;
int? comic;
int? bbq;
@JsonKey(name: 'dress_up')
int? dressUp;
@JsonKey(name: 'disable_following')
int? disableFollowing;
@JsonKey(name: 'live_playback')
int? livePlayback;
@JsonKey(name: 'close_space_medal')
int? closeSpaceMedal;
@JsonKey(name: 'only_show_wearing')
int? onlyShowWearing;
@JsonKey(name: 'disable_show_school')
int? disableShowSchool;
@JsonKey(name: 'disable_show_nft')
int? disableShowNft;
@JsonKey(name: 'disable_show_fans')
int? disableShowFans;
@JsonKey(name: 'charge_video')
int? chargeVideo;
@JsonKey(name: 'lesson_video')
int? lessonVideo;
int? channel;
@JsonKey(name: 'fav_video')
int? favVideo;
@JsonKey(name: 'coins_video')
int? coinsVideo;
@JsonKey(name: 'likes_video')
int? likesVideo;
int? bangumi;
@JsonKey(name: 'played_game')
int? playedGame;
int? groups;
int? comic;
int? bbq;
@JsonKey(name: 'dress_up')
int? dressUp;
@JsonKey(name: 'disable_following')
int? disableFollowing;
@JsonKey(name: 'live_playback')
int? livePlayback;
@JsonKey(name: 'close_space_medal')
int? closeSpaceMedal;
@JsonKey(name: 'only_show_wearing')
int? onlyShowWearing;
@JsonKey(name: 'disable_show_school')
int? disableShowSchool;
@JsonKey(name: 'disable_show_nft')
int? disableShowNft;
@JsonKey(name: 'disable_show_fans')
int? disableShowFans;
@JsonKey(name: 'charge_video')
int? chargeVideo;
@JsonKey(name: 'lesson_video')
int? lessonVideo;
Setting({
this.channel,
this.favVideo,
this.coinsVideo,
this.likesVideo,
this.bangumi,
this.playedGame,
this.groups,
this.comic,
this.bbq,
this.dressUp,
this.disableFollowing,
this.livePlayback,
this.closeSpaceMedal,
this.onlyShowWearing,
this.disableShowSchool,
this.disableShowNft,
this.disableShowFans,
this.chargeVideo,
this.lessonVideo,
});
Setting({
this.channel,
this.favVideo,
this.coinsVideo,
this.likesVideo,
this.bangumi,
this.playedGame,
this.groups,
this.comic,
this.bbq,
this.dressUp,
this.disableFollowing,
this.livePlayback,
this.closeSpaceMedal,
this.onlyShowWearing,
this.disableShowSchool,
this.disableShowNft,
this.disableShowFans,
this.chargeVideo,
this.lessonVideo,
});
factory Setting.fromJson(Map<String, dynamic> json) {
return _$SettingFromJson(json);
}
factory Setting.fromJson(Map<String, dynamic> json) {
return _$SettingFromJson(json);
}
Map<String, dynamic> toJson() => _$SettingToJson(this);
Map<String, dynamic> toJson() => _$SettingToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'size_spec.g.dart';
@JsonSerializable()
class SizeSpec {
double? width;
double? height;
double? width;
double? height;
SizeSpec({this.width, this.height});
SizeSpec({this.width, this.height});
factory SizeSpec.fromJson(Map<String, dynamic> json) {
return _$SizeSpecFromJson(json);
}
factory SizeSpec.fromJson(Map<String, dynamic> json) {
return _$SizeSpecFromJson(json);
}
Map<String, dynamic> toJson() => _$SizeSpecToJson(this);
Map<String, dynamic> toJson() => _$SizeSpecToJson(this);
}

View File

@@ -4,34 +4,34 @@ part 'badge.g.dart';
@JsonSerializable()
class Badge {
String? text;
@JsonKey(name: 'text_color')
String? textColor;
@JsonKey(name: 'text_color_night')
String? textColorNight;
@JsonKey(name: 'bg_color')
String? bgColor;
@JsonKey(name: 'bg_color_night')
String? bgColorNight;
@JsonKey(name: 'border_color')
String? borderColor;
@JsonKey(name: 'border_color_night')
String? borderColorNight;
@JsonKey(name: 'bg_style')
int? bgStyle;
String? text;
@JsonKey(name: 'text_color')
String? textColor;
@JsonKey(name: 'text_color_night')
String? textColorNight;
@JsonKey(name: 'bg_color')
String? bgColor;
@JsonKey(name: 'bg_color_night')
String? bgColorNight;
@JsonKey(name: 'border_color')
String? borderColor;
@JsonKey(name: 'border_color_night')
String? borderColorNight;
@JsonKey(name: 'bg_style')
int? bgStyle;
Badge({
this.text,
this.textColor,
this.textColorNight,
this.bgColor,
this.bgColorNight,
this.borderColor,
this.borderColorNight,
this.bgStyle,
});
Badge({
this.text,
this.textColor,
this.textColorNight,
this.bgColor,
this.bgColorNight,
this.borderColor,
this.borderColorNight,
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);
}

View File

@@ -4,15 +4,15 @@ part 'cursor_attr.g.dart';
@JsonSerializable()
class CursorAttr {
@JsonKey(name: 'is_last_watched_arc')
bool? isLastWatchedArc;
int? rank;
@JsonKey(name: 'is_last_watched_arc')
bool? isLastWatchedArc;
int? rank;
CursorAttr({this.isLastWatchedArc, this.rank});
CursorAttr({this.isLastWatchedArc, this.rank});
factory CursorAttr.fromJson(Map<String, dynamic> json) {
return _$CursorAttrFromJson(json);
}
factory CursorAttr.fromJson(Map<String, dynamic> json) {
return _$CursorAttrFromJson(json);
}
Map<String, dynamic> toJson() => _$CursorAttrToJson(this);
Map<String, dynamic> toJson() => _$CursorAttrToJson(this);
}

View File

@@ -4,14 +4,14 @@ part 'episodic_button.g.dart';
@JsonSerializable()
class EpisodicButton {
String? text;
String? uri;
String? text;
String? uri;
EpisodicButton({this.text, this.uri});
EpisodicButton({this.text, this.uri});
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
return _$EpisodicButtonFromJson(json);
}
factory EpisodicButton.fromJson(Map<String, dynamic> json) {
return _$EpisodicButtonFromJson(json);
}
Map<String, dynamic> toJson() => _$EpisodicButtonToJson(this);
Map<String, dynamic> toJson() => _$EpisodicButtonToJson(this);
}

View File

@@ -4,21 +4,21 @@ part 'last_watched_locator.g.dart';
@JsonSerializable()
class LastWatchedLocator {
@JsonKey(name: 'display_threshold')
int? displayThreshold;
@JsonKey(name: 'insert_ranking')
int? insertRanking;
String? text;
@JsonKey(name: 'display_threshold')
int? displayThreshold;
@JsonKey(name: 'insert_ranking')
int? insertRanking;
String? text;
LastWatchedLocator({
this.displayThreshold,
this.insertRanking,
this.text,
});
LastWatchedLocator({
this.displayThreshold,
this.insertRanking,
this.text,
});
factory LastWatchedLocator.fromJson(Map<String, dynamic> json) {
return _$LastWatchedLocatorFromJson(json);
}
factory LastWatchedLocator.fromJson(Map<String, dynamic> json) {
return _$LastWatchedLocatorFromJson(json);
}
Map<String, dynamic> toJson() => _$LastWatchedLocatorToJson(this);
Map<String, dynamic> toJson() => _$LastWatchedLocatorToJson(this);
}

View File

@@ -4,12 +4,12 @@ part 'order.g.dart';
@JsonSerializable()
class Order {
String? title;
String? value;
String? title;
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);
}

View File

@@ -4,16 +4,16 @@ part 'category.g.dart';
@JsonSerializable()
class Category {
int? id;
@JsonKey(name: 'parent_id')
int? parentId;
String? name;
int? id;
@JsonKey(name: 'parent_id')
int? parentId;
String? name;
Category({this.id, this.parentId, this.name});
Category({this.id, this.parentId, this.name});
factory Category.fromJson(Map<String, dynamic> json) {
return _$CategoryFromJson(json);
}
factory Category.fromJson(Map<String, dynamic> json) {
return _$CategoryFromJson(json);
}
Map<String, dynamic> toJson() => _$CategoryToJson(this);
Map<String, dynamic> toJson() => _$CategoryToJson(this);
}

View File

@@ -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/category.dart';
import 'package:PiliPlus/models/space_article/media.dart';
@@ -55,6 +57,7 @@ class SpaceArticleItem {
int? versionId;
String? dynIdStr;
int? totalArtNum;
List<ReadOpusModel>? ops;
SpaceArticleItem.fromJson(Map<String, dynamic> json) {
id = json["id"];
@@ -105,8 +108,13 @@ class SpaceArticleItem {
keywords = json["keywords"];
if (json['opus'] != null) opus = Opus.fromJson(json['opus']);
versionId = json["version_id"];
dynIdStr = json["dyn_id_str"];
dynIdStr = json["dyn_id_str"] == '' ? null : json["dyn_id_str"];
totalArtNum = json["total_art_num"];
if (type == 3 && content != null) {
ops = (jsonDecode(content!)['ops'] as List?)
?.map((e) => ReadOpusModel.fromJson(e))
.toList();
}
}
}

View File

@@ -4,14 +4,14 @@ part 'label.g.dart';
@JsonSerializable()
class Label {
String? path;
String? text;
@JsonKey(name: 'label_theme')
String? labelTheme;
String? path;
String? text;
@JsonKey(name: 'label_theme')
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);
}

View File

@@ -4,30 +4,30 @@ part 'media.g.dart';
@JsonSerializable()
class Media {
int? score;
@JsonKey(name: 'media_id')
int? mediaId;
String? title;
String? cover;
String? area;
@JsonKey(name: 'type_id')
int? typeId;
@JsonKey(name: 'type_name')
String? typeName;
int? spoiler;
int? score;
@JsonKey(name: 'media_id')
int? mediaId;
String? title;
String? cover;
String? area;
@JsonKey(name: 'type_id')
int? typeId;
@JsonKey(name: 'type_name')
String? typeName;
int? spoiler;
Media({
this.score,
this.mediaId,
this.title,
this.cover,
this.area,
this.typeId,
this.typeName,
this.spoiler,
});
Media({
this.score,
this.mediaId,
this.title,
this.cover,
this.area,
this.typeId,
this.typeName,
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);
}

View File

@@ -4,26 +4,26 @@ part 'nameplate.g.dart';
@JsonSerializable()
class Nameplate {
int? nid;
String? name;
String? image;
@JsonKey(name: 'image_small')
String? imageSmall;
String? level;
String? condition;
int? nid;
String? name;
String? image;
@JsonKey(name: 'image_small')
String? imageSmall;
String? level;
String? condition;
Nameplate({
this.nid,
this.name,
this.image,
this.imageSmall,
this.level,
this.condition,
});
Nameplate({
this.nid,
this.name,
this.image,
this.imageSmall,
this.level,
this.condition,
});
factory Nameplate.fromJson(Map<String, dynamic> json) {
return _$NameplateFromJson(json);
}
factory Nameplate.fromJson(Map<String, dynamic> json) {
return _$NameplateFromJson(json);
}
Map<String, dynamic> toJson() => _$NameplateToJson(this);
Map<String, dynamic> toJson() => _$NameplateToJson(this);
}

View File

@@ -1,13 +1,13 @@
class Stat {
String? like;
String? like;
Stat({this.like});
Stat({this.like});
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
like: json['like'] as String?,
);
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
like: json['like'] as String?,
);
Map<String, dynamic> toJson() => {
'like': like,
};
Map<String, dynamic> toJson() => {
'like': like,
};
}