mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
@@ -18,12 +18,12 @@ class Choice {
|
||||
});
|
||||
|
||||
factory Choice.fromJson(Map<String, dynamic> json) => Choice(
|
||||
id: json['id'] as int?,
|
||||
platformAction: json['platform_action'] as String?,
|
||||
nativeAction: json['native_action'] as String?,
|
||||
condition: json['condition'] as String?,
|
||||
cid: json['cid'] as int?,
|
||||
option: json['option'] as String?,
|
||||
isDefault: json['is_default'] as int?,
|
||||
);
|
||||
id: json['id'] as int?,
|
||||
platformAction: json['platform_action'] as String?,
|
||||
nativeAction: json['native_action'] as String?,
|
||||
condition: json['condition'] as String?,
|
||||
cid: json['cid'] as int?,
|
||||
option: json['option'] as String?,
|
||||
isDefault: json['is_default'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -22,18 +22,18 @@ class EdgeInfoData {
|
||||
});
|
||||
|
||||
factory EdgeInfoData.fromJson(Map<String, dynamic> json) => EdgeInfoData(
|
||||
title: json['title'] as String?,
|
||||
edgeId: json['edge_id'] as int?,
|
||||
storyList: (json['story_list'] as List<dynamic>?)
|
||||
?.map((e) => StoryList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
edges: json['edges'] == null
|
||||
? null
|
||||
: Edges.fromJson(json['edges'] as Map<String, dynamic>),
|
||||
buvid: json['buvid'] as String?,
|
||||
preload: json['preload'] == null
|
||||
? null
|
||||
: Preload.fromJson(json['preload'] as Map<String, dynamic>),
|
||||
isLeaf: json['is_leaf'] as int?,
|
||||
);
|
||||
title: json['title'] as String?,
|
||||
edgeId: json['edge_id'] as int?,
|
||||
storyList: (json['story_list'] as List<dynamic>?)
|
||||
?.map((e) => StoryList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
edges: json['edges'] == null
|
||||
? null
|
||||
: Edges.fromJson(json['edges'] as Map<String, dynamic>),
|
||||
buvid: json['buvid'] as String?,
|
||||
preload: json['preload'] == null
|
||||
? null
|
||||
: Preload.fromJson(json['preload'] as Map<String, dynamic>),
|
||||
isLeaf: json['is_leaf'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ class Dimension {
|
||||
Dimension({this.width, this.height, this.rotate, this.sar});
|
||||
|
||||
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
|
||||
width: json['width'] as int?,
|
||||
height: json['height'] as int?,
|
||||
rotate: json['rotate'] as int?,
|
||||
sar: json['sar'] as String?,
|
||||
);
|
||||
width: json['width'] as int?,
|
||||
height: json['height'] as int?,
|
||||
rotate: json['rotate'] as int?,
|
||||
sar: json['sar'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@ class Edges {
|
||||
Edges({this.dimension, this.questions, this.skin});
|
||||
|
||||
factory Edges.fromJson(Map<String, dynamic> json) => Edges(
|
||||
dimension: json['dimension'] == null
|
||||
? null
|
||||
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
|
||||
questions: (json['questions'] as List<dynamic>?)
|
||||
?.map((e) => Question.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
skin: json['skin'] == null
|
||||
? null
|
||||
: Skin.fromJson(json['skin'] as Map<String, dynamic>),
|
||||
);
|
||||
dimension: json['dimension'] == null
|
||||
? null
|
||||
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
|
||||
questions: (json['questions'] as List<dynamic>?)
|
||||
?.map((e) => Question.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
skin: json['skin'] == null
|
||||
? null
|
||||
: Skin.fromJson(json['skin'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ class Preload {
|
||||
Preload({this.video});
|
||||
|
||||
factory Preload.fromJson(Map<String, dynamic> json) => Preload(
|
||||
video: (json['video'] as List<dynamic>?)
|
||||
?.map((e) => Video.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
video: (json['video'] as List<dynamic>?)
|
||||
?.map((e) => Video.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ class Question {
|
||||
});
|
||||
|
||||
factory Question.fromJson(Map<String, dynamic> json) => Question(
|
||||
id: json['id'] as int?,
|
||||
type: json['type'] as int?,
|
||||
startTimeR: json['start_time_r'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
pauseVideo: json['pause_video'] as int?,
|
||||
title: json['title'] as String?,
|
||||
choices: (json['choices'] as List<dynamic>?)
|
||||
?.map((e) => Choice.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
id: json['id'] as int?,
|
||||
type: json['type'] as int?,
|
||||
startTimeR: json['start_time_r'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
pauseVideo: json['pause_video'] as int?,
|
||||
title: json['title'] as String?,
|
||||
choices: (json['choices'] as List<dynamic>?)
|
||||
?.map((e) => Choice.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@ class Skin {
|
||||
});
|
||||
|
||||
factory Skin.fromJson(Map<String, dynamic> json) => Skin(
|
||||
choiceImage: json['choice_image'] as String?,
|
||||
titleTextColor: json['title_text_color'] as String?,
|
||||
titleShadowColor: json['title_shadow_color'] as String?,
|
||||
titleShadowOffsetY: json['title_shadow_offset_y'] as int?,
|
||||
titleShadowRadius: json['title_shadow_radius'] as int?,
|
||||
progressbarColor: json['progressbar_color'] as String?,
|
||||
progressbarShadowColor: json['progressbar_shadow_color'] as String?,
|
||||
);
|
||||
choiceImage: json['choice_image'] as String?,
|
||||
titleTextColor: json['title_text_color'] as String?,
|
||||
titleShadowColor: json['title_shadow_color'] as String?,
|
||||
titleShadowOffsetY: json['title_shadow_offset_y'] as int?,
|
||||
titleShadowRadius: json['title_shadow_radius'] as int?,
|
||||
progressbarColor: json['progressbar_color'] as String?,
|
||||
progressbarShadowColor: json['progressbar_shadow_color'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@ class StoryList {
|
||||
});
|
||||
|
||||
factory StoryList.fromJson(Map<String, dynamic> json) => StoryList(
|
||||
nodeId: json['node_id'] as int?,
|
||||
edgeId: json['edge_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cid: json['cid'] as int?,
|
||||
startPos: json['start_pos'] as int?,
|
||||
cover: json['cover'] as String?,
|
||||
isCurrent: json['is_current'] as int?,
|
||||
cursor: json['cursor'] as int?,
|
||||
);
|
||||
nodeId: json['node_id'] as int?,
|
||||
edgeId: json['edge_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cid: json['cid'] as int?,
|
||||
startPos: json['start_pos'] as int?,
|
||||
cover: json['cover'] as String?,
|
||||
isCurrent: json['is_current'] as int?,
|
||||
cursor: json['cursor'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class Video {
|
||||
Video({this.aid, this.cid});
|
||||
|
||||
factory Video.fromJson(Map<String, dynamic> json) => Video(
|
||||
aid: json['aid'] as int?,
|
||||
cid: json['cid'] as int?,
|
||||
);
|
||||
aid: json['aid'] as int?,
|
||||
cid: json['cid'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user