fix logout issue

This commit is contained in:
tzw
2024-02-23 17:05:51 +06:30
parent 421bcf0a11
commit 5496bae681
23 changed files with 144 additions and 84 deletions

View File

@@ -21,7 +21,6 @@ class User {
String? preferCurrency;
bool enablePinLogin;
String? pinDigit;
String? confirmPinDigit;
String get initial =>
name != null && name != "" ? name!.substring(0, 1) : "?";
@@ -60,21 +59,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,
this.confirmPinDigit});
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,
});
factory User.fromJson(Map<String, dynamic> json) {
return User(