add update phone number and recovery email
This commit is contained in:
@@ -4,6 +4,11 @@ class AuthResult {
|
||||
AuthStatus? authStatus;
|
||||
String? authErrorCode;
|
||||
String? authErrorMsg;
|
||||
String? forceResendingToken;
|
||||
|
||||
AuthResult({this.authStatus, this.authErrorCode, this.authErrorMsg});
|
||||
AuthResult(
|
||||
{this.authStatus,
|
||||
this.authErrorCode,
|
||||
this.authErrorMsg,
|
||||
this.forceResendingToken});
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ class User {
|
||||
bool enablePinLogin;
|
||||
String? pinDigit;
|
||||
List<String> privileges = [];
|
||||
String? recoveryEmail;
|
||||
|
||||
String get initial =>
|
||||
name != null && name != "" ? name!.substring(0, 1) : "?";
|
||||
@@ -51,7 +52,7 @@ class User {
|
||||
|
||||
// for pin login
|
||||
String? pinToken;
|
||||
bool get isPinLogin => pinToken!=null;
|
||||
bool get isPinLogin => pinToken != null;
|
||||
|
||||
String get phone => phoneNumber != null && phoneNumber!.startsWith("959")
|
||||
? "0${phoneNumber!.substring(2)}"
|
||||
@@ -62,21 +63,21 @@ class User {
|
||||
bool get disabled => status != null && status == user_disabled_status;
|
||||
|
||||
String get share => "Your phone number:$phoneNumber";
|
||||
User({
|
||||
this.id,
|
||||
this.name,
|
||||
this.phoneNumber,
|
||||
this.fcsID,
|
||||
this.status,
|
||||
this.privileges = const [],
|
||||
this.lastMessage,
|
||||
this.lastMessageTime,
|
||||
this.userUnseenCount = 0,
|
||||
this.fcsUnseenCount = 0,
|
||||
this.preferCurrency,
|
||||
this.enablePinLogin = false,
|
||||
this.pinDigit,
|
||||
});
|
||||
User(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.phoneNumber,
|
||||
this.fcsID,
|
||||
this.status,
|
||||
this.privileges = const [],
|
||||
this.lastMessage,
|
||||
this.lastMessageTime,
|
||||
this.userUnseenCount = 0,
|
||||
this.fcsUnseenCount = 0,
|
||||
this.preferCurrency,
|
||||
this.enablePinLogin = false,
|
||||
this.pinDigit,
|
||||
this.recoveryEmail});
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) {
|
||||
return User(
|
||||
|
||||
Reference in New Issue
Block a user