dyn topic fold

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-06 12:22:27 +08:00
parent 5e1c73abc1
commit aa03eed92d
13 changed files with 184 additions and 97 deletions

View File

@@ -0,0 +1,11 @@
class FoldCardItem {
int? foldCount;
String? foldDesc;
FoldCardItem({this.foldCount, this.foldDesc});
factory FoldCardItem.fromJson(Map<String, dynamic> json) => FoldCardItem(
foldCount: json['fold_count'] as int?,
foldDesc: json['fold_desc'] as String?,
);
}

View File

@@ -1,10 +1,12 @@
import 'package:PiliPlus/models/dynamics/result.dart';
import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/fold_card_item.dart';
class TopicCardItem {
FoldCardItem? foldCardItem;
DynamicItemModel? dynamicCardItem;
String? topicType;
TopicCardItem({this.dynamicCardItem, this.topicType});
TopicCardItem({this.dynamicCardItem, this.foldCardItem, this.topicType});
factory TopicCardItem.fromJson(Map<String, dynamic> json) => TopicCardItem(
dynamicCardItem: json['dynamic_card_item'] == null
@@ -12,6 +14,11 @@ class TopicCardItem {
: DynamicItemModel.fromJson(
json['dynamic_card_item'] as Map<String, dynamic>,
),
foldCardItem: json['fold_card_item'] == null
? null
: FoldCardItem.fromJson(
json['fold_card_item'] as Map<String, dynamic>,
),
topicType: json['topic_type'] as String?,
);
}