manage network state for both user info and user group

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-06-21 16:08:45 +08:00
parent 581e84d806
commit 10508a41b1
6 changed files with 64 additions and 33 deletions

View File

@@ -14,7 +14,6 @@ import 'platform_model.dart';
class UserModel {
final RxString userName = ''.obs;
final RxBool isAdmin = false.obs;
final RxBool fromServer = false.obs;
WeakReference<FFI> parent;
UserModel(this.parent);
@@ -85,7 +84,6 @@ class UserModel {
_parseAndUpdateUser(UserPayload user) {
userName.value = user.name;
isAdmin.value = user.isAdmin;
fromServer.value = true;
}
Future<void> _updateOtherModels() async {