fix: List dataType

This commit is contained in:
guozhigq
2024-02-28 00:45:13 +08:00
parent 542975d0ec
commit db03cdd442
11 changed files with 15 additions and 15 deletions

View File

@ -15,7 +15,7 @@ class FavFolderData {
? json['list'] ? json['list']
.map<FavFolderItemData>((e) => FavFolderItemData.fromJson(e)) .map<FavFolderItemData>((e) => FavFolderItemData.fromJson(e))
.toList() .toList()
: [FavFolderItemData()]; : <FavFolderItemData>[];
hasMore = json['has_more']; hasMore = json['has_more'];
} }
} }

View File

@ -7,8 +7,8 @@ import 'package:pilipala/utils/storage.dart';
class BangumiController extends GetxController { class BangumiController extends GetxController {
final ScrollController scrollController = ScrollController(); final ScrollController scrollController = ScrollController();
RxList<BangumiListItemModel> bangumiList = [BangumiListItemModel()].obs; RxList<BangumiListItemModel> bangumiList = <BangumiListItemModel>[].obs;
RxList<BangumiListItemModel> bangumiFollowList = [BangumiListItemModel()].obs; RxList<BangumiListItemModel> bangumiFollowList = <BangumiListItemModel>[].obs;
int _currentPage = 1; int _currentPage = 1;
bool isLoadingMore = true; bool isLoadingMore = true;
Box userInfoCache = GStrorage.userInfo; Box userInfoCache = GStrorage.userInfo;

View File

@ -139,7 +139,7 @@ class BlackListController extends GetxController {
int currentPage = 1; int currentPage = 1;
int pageSize = 50; int pageSize = 50;
RxInt total = 0.obs; RxInt total = 0.obs;
RxList<BlackListItem> blackList = [BlackListItem()].obs; RxList<BlackListItem> blackList = <BlackListItem>[].obs;
Future queryBlacklist({type = 'init'}) async { Future queryBlacklist({type = 'init'}) async {
if (type == 'init') { if (type == 'init') {

View File

@ -20,7 +20,7 @@ import 'package:pilipala/utils/utils.dart';
class DynamicsController extends GetxController { class DynamicsController extends GetxController {
int page = 1; int page = 1;
String? offset = ''; String? offset = '';
RxList<DynamicItemModel> dynamicsList = [DynamicItemModel()].obs; RxList<DynamicItemModel> dynamicsList = <DynamicItemModel>[].obs;
Rx<DynamicsType> dynamicsType = DynamicsType.values[0].obs; Rx<DynamicsType> dynamicsType = DynamicsType.values[0].obs;
RxString dynamicsTypeLabel = '全部'.obs; RxString dynamicsTypeLabel = '全部'.obs;
final ScrollController scrollController = ScrollController(); final ScrollController scrollController = ScrollController();
@ -105,7 +105,7 @@ class DynamicsController extends GetxController {
onSelectType(value) async { onSelectType(value) async {
dynamicsType.value = filterTypeList[value]['value']; dynamicsType.value = filterTypeList[value]['value'];
dynamicsList.value = [DynamicItemModel()]; dynamicsList.value = <DynamicItemModel>[];
page = 1; page = 1;
initialValue.value = value; initialValue.value = value;
await queryFollowDynamic(); await queryFollowDynamic();
@ -264,7 +264,7 @@ class DynamicsController extends GetxController {
onSelectUp(mid) async { onSelectUp(mid) async {
dynamicsType.value = DynamicsType.values[0]; dynamicsType.value = DynamicsType.values[0];
dynamicsList.value = [DynamicItemModel()]; dynamicsList.value = <DynamicItemModel>[];
page = 1; page = 1;
queryFollowDynamic(); queryFollowDynamic();
} }
@ -293,7 +293,7 @@ class DynamicsController extends GetxController {
dynamicsType.value = DynamicsType.values[0]; dynamicsType.value = DynamicsType.values[0];
initialValue.value = 0; initialValue.value = 0;
SmartDialog.showToast('还原默认加载'); SmartDialog.showToast('还原默认加载');
dynamicsList.value = [DynamicItemModel()]; dynamicsList.value = <DynamicItemModel>[];
queryFollowDynamic(); queryFollowDynamic();
} }
} }

View File

@ -17,7 +17,7 @@ class DynamicDetailController extends GetxController {
int currentPage = 0; int currentPage = 0;
bool isLoadingMore = false; bool isLoadingMore = false;
RxString noMore = ''.obs; RxString noMore = ''.obs;
RxList<ReplyItemModel> replyList = [ReplyItemModel()].obs; RxList<ReplyItemModel> replyList = <ReplyItemModel>[].obs;
RxInt acount = 0.obs; RxInt acount = 0.obs;
final ScrollController scrollController = ScrollController(); final ScrollController scrollController = ScrollController();

View File

@ -10,7 +10,7 @@ class FansController extends GetxController {
int pn = 1; int pn = 1;
int ps = 20; int ps = 20;
int total = 0; int total = 0;
RxList<FansItemModel> fansList = [FansItemModel()].obs; RxList<FansItemModel> fansList = <FansItemModel>[].obs;
late int mid; late int mid;
late String name; late String name;
var userInfo; var userInfo;

View File

@ -7,7 +7,7 @@ class HotController extends GetxController {
final ScrollController scrollController = ScrollController(); final ScrollController scrollController = ScrollController();
final int _count = 20; final int _count = 20;
int _currentPage = 1; int _currentPage = 1;
RxList<HotVideoItemModel> videoList = [HotVideoItemModel()].obs; RxList<HotVideoItemModel> videoList = <HotVideoItemModel>[].obs;
bool isLoadingMore = false; bool isLoadingMore = false;
bool flag = false; bool flag = false;
OverlayEntry? popupDialog; OverlayEntry? popupDialog;

View File

@ -20,7 +20,7 @@ class MemberController extends GetxController {
Box userInfoCache = GStrorage.userInfo; Box userInfoCache = GStrorage.userInfo;
late int ownerMid; late int ownerMid;
// 投稿列表 // 投稿列表
RxList<VListItemModel>? archiveList = [VListItemModel()].obs; RxList<VListItemModel>? archiveList = <VListItemModel>[].obs;
dynamic userInfo; dynamic userInfo;
RxInt attribute = (-1).obs; RxInt attribute = (-1).obs;
RxString attributeText = '关注'.obs; RxString attributeText = '关注'.obs;

View File

@ -15,7 +15,7 @@ class SSearchController extends GetxController {
Box histiryWord = GStrorage.historyword; Box histiryWord = GStrorage.historyword;
List historyCacheList = []; List historyCacheList = [];
RxList historyList = [].obs; RxList historyList = [].obs;
RxList<SearchSuggestItem> searchSuggestList = [SearchSuggestItem()].obs; RxList<SearchSuggestItem> searchSuggestList = <SearchSuggestItem>[].obs;
final _debouncer = final _debouncer =
Debouncer(delay: const Duration(milliseconds: 200)); // 设置延迟时间 Debouncer(delay: const Duration(milliseconds: 200)); // 设置延迟时间
String hintText = '搜索'; String hintText = '搜索';

View File

@ -22,7 +22,7 @@ class VideoReplyController extends GetxController {
String? replyLevel; String? replyLevel;
// rpid 请求楼中楼回复 // rpid 请求楼中楼回复
String? rpid; String? rpid;
RxList<ReplyItemModel> replyList = [ReplyItemModel()].obs; RxList<ReplyItemModel> replyList = <ReplyItemModel>[].obs;
// 当前页 // 当前页
int currentPage = 0; int currentPage = 0;
bool isLoadingMore = false; bool isLoadingMore = false;

View File

@ -12,7 +12,7 @@ class VideoReplyReplyController extends GetxController {
// rpid 请求楼中楼回复 // rpid 请求楼中楼回复
String? rpid; String? rpid;
ReplyType replyType = ReplyType.video; ReplyType replyType = ReplyType.video;
RxList<ReplyItemModel> replyList = [ReplyItemModel()].obs; RxList<ReplyItemModel> replyList = <ReplyItemModel>[].obs;
// 当前页 // 当前页
int currentPage = 0; int currentPage = 0;
bool isLoadingMore = false; bool isLoadingMore = false;