用户资料

This commit is contained in:
2022-10-26 13:24:11 +08:00
parent 69f0a7a81e
commit afee57df73
12 changed files with 368 additions and 35 deletions

View File

@@ -86,4 +86,17 @@ class AuthService extends GetxService {
isLogin.value = false;
Get.offAllNamed(AuthRoutes.index);
}
Future<void> updateUserInfo(String key, String value) async {
// userInfo.value.nickname = nickname;
if (key == 'nickname') {
userInfo.value.nickname = value;
} else if (key == 'avatar') {
userInfo.value.avatar = value;
}
userInfo.refresh();
_box.write('userInfo', userInfo.toJson());
}
}