mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: null safe
This commit is contained in:
@@ -11,8 +11,8 @@ class FansController extends GetxController {
|
|||||||
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;
|
||||||
RxString loadingText = '加载中...'.obs;
|
RxString loadingText = '加载中...'.obs;
|
||||||
RxBool isOwner = false.obs;
|
RxBool isOwner = false.obs;
|
||||||
@@ -23,9 +23,9 @@ class FansController extends GetxController {
|
|||||||
userInfo = userInfoCache.get('userInfoCache');
|
userInfo = userInfoCache.get('userInfoCache');
|
||||||
mid = Get.parameters['mid'] != null
|
mid = Get.parameters['mid'] != null
|
||||||
? int.parse(Get.parameters['mid']!)
|
? int.parse(Get.parameters['mid']!)
|
||||||
: userInfo.mid;
|
: userInfo?.mid;
|
||||||
isOwner.value = mid == userInfo.mid;
|
isOwner.value = mid == userInfo?.mid;
|
||||||
name = Get.parameters['name'] ?? userInfo.uname;
|
name = Get.parameters['name'] ?? userInfo?.uname;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future queryFans(type) async {
|
Future queryFans(type) async {
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
|
|||||||
int ps = 20;
|
int ps = 20;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
RxList<FollowItemModel> followList = <FollowItemModel>[].obs;
|
RxList<FollowItemModel> followList = <FollowItemModel>[].obs;
|
||||||
late int mid;
|
late int? mid;
|
||||||
late String name;
|
late String? name;
|
||||||
var userInfo;
|
var userInfo;
|
||||||
RxString loadingText = '加载中...'.obs;
|
RxString loadingText = '加载中...'.obs;
|
||||||
RxBool isOwner = false.obs;
|
RxBool isOwner = false.obs;
|
||||||
@@ -30,9 +30,9 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
|
|||||||
userInfo = userInfoCache.get('userInfoCache');
|
userInfo = userInfoCache.get('userInfoCache');
|
||||||
mid = Get.parameters['mid'] != null
|
mid = Get.parameters['mid'] != null
|
||||||
? int.parse(Get.parameters['mid']!)
|
? int.parse(Get.parameters['mid']!)
|
||||||
: userInfo.mid;
|
: userInfo?.mid;
|
||||||
isOwner.value = mid == userInfo.mid;
|
isOwner.value = mid == userInfo?.mid;
|
||||||
name = Get.parameters['name'] ?? userInfo.uname;
|
name = Get.parameters['name'] ?? userInfo?.uname;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future queryFollowings(type) async {
|
Future queryFollowings(type) async {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class OwnerFollowList extends StatefulWidget {
|
|||||||
|
|
||||||
class _OwnerFollowListState extends State<OwnerFollowList>
|
class _OwnerFollowListState extends State<OwnerFollowList>
|
||||||
with AutomaticKeepAliveClientMixin {
|
with AutomaticKeepAliveClientMixin {
|
||||||
late int mid;
|
late int? mid;
|
||||||
late Future _futureBuilderFuture;
|
late Future _futureBuilderFuture;
|
||||||
final ScrollController scrollController = ScrollController();
|
final ScrollController scrollController = ScrollController();
|
||||||
int pn = 1;
|
int pn = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user