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:
@@ -16,8 +16,8 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
|
||||
int ps = 20;
|
||||
int total = 0;
|
||||
RxList<FollowItemModel> followList = <FollowItemModel>[].obs;
|
||||
late int mid;
|
||||
late String name;
|
||||
late int? mid;
|
||||
late String? name;
|
||||
var userInfo;
|
||||
RxString loadingText = '加载中...'.obs;
|
||||
RxBool isOwner = false.obs;
|
||||
@@ -30,9 +30,9 @@ class FollowController extends GetxController with GetTickerProviderStateMixin {
|
||||
userInfo = userInfoCache.get('userInfoCache');
|
||||
mid = Get.parameters['mid'] != null
|
||||
? int.parse(Get.parameters['mid']!)
|
||||
: userInfo.mid;
|
||||
isOwner.value = mid == userInfo.mid;
|
||||
name = Get.parameters['name'] ?? userInfo.uname;
|
||||
: userInfo?.mid;
|
||||
isOwner.value = mid == userInfo?.mid;
|
||||
name = Get.parameters['name'] ?? userInfo?.uname;
|
||||
}
|
||||
|
||||
Future queryFollowings(type) async {
|
||||
|
||||
@@ -20,7 +20,7 @@ class OwnerFollowList extends StatefulWidget {
|
||||
|
||||
class _OwnerFollowListState extends State<OwnerFollowList>
|
||||
with AutomaticKeepAliveClientMixin {
|
||||
late int mid;
|
||||
late int? mid;
|
||||
late Future _futureBuilderFuture;
|
||||
final ScrollController scrollController = ScrollController();
|
||||
int pn = 1;
|
||||
|
||||
Reference in New Issue
Block a user