clean up models

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-05 12:10:18 +08:00
parent b897103af0
commit 279f21857d
308 changed files with 156 additions and 6243 deletions

View File

@@ -2,17 +2,15 @@ import 'package:PiliPlus/models_new/dynamic/dyn_topic_feed/all_sort_by.dart';
class TopicSortByConf {
List<AllSortBy>? allSortBy;
int? defaultSortBy;
int? showSortBy;
TopicSortByConf({this.allSortBy, this.defaultSortBy, this.showSortBy});
TopicSortByConf({this.allSortBy, this.showSortBy});
factory TopicSortByConf.fromJson(Map<String, dynamic> json) {
return TopicSortByConf(
allSortBy: (json['all_sort_by'] as List<dynamic>?)
?.map((e) => AllSortBy.fromJson(e as Map<String, dynamic>))
.toList(),
defaultSortBy: json['default_sort_by'] as int?,
showSortBy: json['show_sort_by'] as int?,
);
}