opt: non null (#1091)

* opt: type

* opt: type 2

* opt: type 3
This commit is contained in:
My-Responsitories
2025-08-23 18:25:41 +08:00
committed by GitHub
parent 6009668427
commit 3c34e43827
75 changed files with 400 additions and 362 deletions

View File

@@ -48,7 +48,7 @@ class FollowChildController
@override
Future<LoadingState<FollowData>> customGetData() {
if (tagid != null) {
return MemberHttp.followUpGroup(mid: mid, tagid: tagid, pn: page);
return MemberHttp.followUpGroup(mid: mid, tagid: tagid!, pn: page);
}
return FollowHttp.followings(

View File

@@ -70,7 +70,7 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
}
Future<void> onUpdateTag(MemberTagItemModel item, String tagName) async {
final res = await MemberHttp.updateFollowTag(item.tagid, tagName);
final res = await MemberHttp.updateFollowTag(item.tagid!, tagName);
if (res['status']) {
item.name = tagName;
tabs.refresh();
@@ -80,7 +80,7 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
}
}
Future<void> onDelTag(int? tagid) async {
Future<void> onDelTag(int tagid) async {
final res = await MemberHttp.delFollowTag(tagid);
if (res['status']) {
followState.value = LoadingState.loading();

View File

@@ -202,7 +202,7 @@ class _FollowPageState extends State<FollowPage> {
context: context,
title: '删除分组',
content: '删除后,该分组下的用户依旧保留?',
onConfirm: () => _followController.onDelTag(item.tagid),
onConfirm: () => _followController.onDelTag(item.tagid!),
);
},
dense: true,