Revert "formatted all files."

This reverts commit 04250ebc98.
This commit is contained in:
Faris Armoush
2025-06-12 16:04:49 +03:00
parent 218f43bacb
commit c642ba2644
473 changed files with 4335 additions and 5417 deletions

View File

@ -21,9 +21,9 @@ class LoginWithEmailModel {
return {
'email': email,
'password': password,
'platform': 'web'
"platform": "web"
// 'regionUuid': regionUuid,
};
}
}
//tst@tst.com
//tst@tst.com

View File

@ -11,14 +11,6 @@ class Token {
final int iat;
final int exp;
Token(
this.accessToken,
this.refreshToken,
this.sessionId,
this.iat,
this.exp,
);
Token.emptyConstructor()
: accessToken = '',
refreshToken = '',
@ -32,6 +24,14 @@ class Token {
bool get isNotEmpty => accessToken.isNotEmpty && refreshToken.isNotEmpty;
Token(
this.accessToken,
this.refreshToken,
this.sessionId,
this.iat,
this.exp,
);
Token.refreshToken(this.refreshToken)
: accessToken = '',
sessionId = '',
@ -40,7 +40,7 @@ class Token {
factory Token.fromJson(Map<String, dynamic> json) {
//save token to secure storage
const storage = FlutterSecureStorage();
var storage = const FlutterSecureStorage();
storage.write(
key: loginAccessTokenKey, value: json[loginAccessTokenKey] ?? '');
storage.write(

View File

@ -55,21 +55,22 @@ class UserModel {
//from token
factory UserModel.fromToken(Token token) {
final tempJson = Token.decodeToken(token.accessToken);
Map<String, dynamic> tempJson = Token.decodeToken(token.accessToken);
return UserModel(
hasAcceptedWebAgreement: null,
role: null,
webAgreementAcceptedAt: null,
uuid: tempJson['uuid'].toString(),
email: tempJson['email'],
firstName: null,
lastName: null,
photoUrl: null,
phoneNumber: null,
isEmailVerified: null,
isAgreementAccepted: null,
project: null);
hasAcceptedWebAgreement: null,
role: null,
webAgreementAcceptedAt: null,
uuid: tempJson['uuid'].toString(),
email: tempJson['email'],
firstName: null,
lastName: null,
photoUrl: null,
phoneNumber: null,
isEmailVerified: null,
isAgreementAccepted: null,
project: null
);
}
Map<String, dynamic> toJson() {