feat(home): 首页改为三列探索网格
This commit is contained in:
1 parent
6dea9d479e
commit
dd96792e33
29 files changed
+1912
-256
No files matched your search
@@ -86,6 +86,8 @@ class Drama {
|
||||
this.favoriteCount,
|
||||
this.commentCount,
|
||||
this.language = '',
|
||||
this.dramaType = '',
|
||||
this.createdAt,
|
||||
this.detailLoaded = false,
|
||||
});
|
||||
|
||||
@@ -109,6 +111,12 @@ class Drama {
|
||||
/// 卡片语种(如 zh-CN / id),用于剧场语言筛选。
|
||||
final String language;
|
||||
|
||||
/// 内容类型:ANIME 漫剧,LIVE 真人剧。
|
||||
final String dramaType;
|
||||
|
||||
/// 上架时间;卡片接口未直接下发时可由 Snowflake id 估算。
|
||||
final DateTime? createdAt;
|
||||
|
||||
/// 详情接口是否已经取过完整剧集列表。
|
||||
/// 列表卡片只带一集可播预览,需要完整剧集时再进详情。
|
||||
final bool detailLoaded;
|
||||
@@ -137,6 +145,8 @@ class Drama {
|
||||
favoriteCount: _optionalInt(json['favoriteCount']),
|
||||
commentCount: _optionalInt(json['commentCount']),
|
||||
language: json['language'] as String? ?? '',
|
||||
dramaType: json['dramaType'] as String? ?? '',
|
||||
createdAt: DateTime.tryParse(json['createdAt']?.toString() ?? ''),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -157,6 +167,8 @@ class Drama {
|
||||
favoriteCount: _optionalInt(json['favoriteCount']),
|
||||
commentCount: _optionalInt(json['commentCount']),
|
||||
language: json['language'] as String? ?? '',
|
||||
dramaType: json['dramaType'] as String? ?? '',
|
||||
createdAt: DateTime.tryParse(json['createdAt']?.toString() ?? ''),
|
||||
detailLoaded: true,
|
||||
episodes: (json['episodes'] as List? ?? const [])
|
||||
.whereType<Map<String, dynamic>>()
|
||||
|
||||
Reference in new issue
Block a user