add pin login and add pin code
This commit is contained in:
@@ -21,6 +21,7 @@ class User {
|
||||
String? preferCurrency;
|
||||
bool enablePinLogin;
|
||||
String? pinDigit;
|
||||
List<String> privileges = [];
|
||||
|
||||
String get initial =>
|
||||
name != null && name != "" ? name!.substring(0, 1) : "?";
|
||||
@@ -48,7 +49,9 @@ class User {
|
||||
String get getFcsUnseenCount =>
|
||||
fcsUnseenCount > 100 ? "99+" : fcsUnseenCount.toString();
|
||||
|
||||
List<String> privileges = [];
|
||||
// for pin login
|
||||
String? pinToken;
|
||||
bool get isPinLogin => pinToken!=null;
|
||||
|
||||
String get phone => phoneNumber != null && phoneNumber!.startsWith("959")
|
||||
? "0${phoneNumber!.substring(2)}"
|
||||
@@ -117,7 +120,9 @@ class User {
|
||||
userUnseenCount: map['user_unseen_count'] ?? 0,
|
||||
fcsUnseenCount: map['fcs_unseen_count'] ?? 0,
|
||||
preferCurrency: map['preferred_currency'],
|
||||
lastMessageTime: _date == null ? null : _date.toDate());
|
||||
lastMessageTime: _date == null ? null : _date.toDate(),
|
||||
enablePinLogin: map['enable_pin_login'] ?? false,
|
||||
pinDigit: map['pin'] ?? '');
|
||||
}
|
||||
|
||||
bool diffPrivileges(User another) {
|
||||
|
||||
Reference in New Issue
Block a user