getting spaces and rooms from api {null checks}

This commit is contained in:
Mohammad Salameh
2024-03-13 13:52:22 +03:00
parent 0f3cc453ce
commit 024f15728b
26 changed files with 390 additions and 266 deletions
+2 -5
View File
@@ -1,6 +1,7 @@
import 'package:syncrow_app/features/auth/model/token.dart';
class UserModel {
static String userUuidKey = 'userUuid';
final String? uuid;
final String? email;
final String? name;
@@ -36,13 +37,9 @@ class UserModel {
//uuid to json
Map<String, dynamic> uuIdAsJson() => {
'userUuid': uuid,
};
//from token
factory UserModel.fromToken(Token token) {
Map<String, dynamic> tempJson = token.decodeToken();
Map<String, dynamic> tempJson = Token.decodeToken(token.accessToken);
return UserModel(
uuid: tempJson['uuid'].toString(),