opt account

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-10 11:42:50 +08:00
parent 5f77a8aa19
commit 4c758bb1a3
51 changed files with 342 additions and 299 deletions

View File

@@ -0,0 +1,20 @@
import 'package:PiliPlus/models/user/info.dart';
import 'package:PiliPlus/utils/storage.dart' show GStorage;
import 'package:get/get.dart';
class AccountService extends GetxService {
late int mid;
late final RxString name;
late final RxString face;
late final RxBool isLogin;
@override
void onInit() {
super.onInit();
UserInfoData? userInfo = GStorage.userInfo.get('userInfoCache');
mid = userInfo?.mid ?? 0;
name = (userInfo?.uname ?? '').obs;
face = (userInfo?.face ?? '').obs;
isLogin = (userInfo != null).obs;
}
}