update main model
This commit is contained in:
@@ -16,8 +16,8 @@ class User {
|
||||
String? fcsID;
|
||||
DateTime? lastMessageTime;
|
||||
String? lastMessage;
|
||||
int? userUnseenCount;
|
||||
int? fcsUnseenCount;
|
||||
int userUnseenCount;
|
||||
int fcsUnseenCount;
|
||||
String? preferCurrency;
|
||||
|
||||
String get initial =>
|
||||
@@ -42,12 +42,12 @@ class User {
|
||||
}
|
||||
|
||||
String get getUserUnseenCount => userUnseenCount != null
|
||||
? userUnseenCount! > 100
|
||||
? userUnseenCount > 100
|
||||
? "99+"
|
||||
: userUnseenCount.toString()
|
||||
: "0";
|
||||
String get getFcsUnseenCount => fcsUnseenCount != null
|
||||
? fcsUnseenCount! > 100
|
||||
? fcsUnseenCount > 100
|
||||
? "99+"
|
||||
: fcsUnseenCount.toString()
|
||||
: "0";
|
||||
@@ -72,8 +72,8 @@ class User {
|
||||
this.privileges = const [],
|
||||
this.lastMessage,
|
||||
this.lastMessageTime,
|
||||
this.userUnseenCount,
|
||||
this.fcsUnseenCount,
|
||||
this.userUnseenCount = 0,
|
||||
this.fcsUnseenCount = 0,
|
||||
this.preferCurrency});
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) {
|
||||
|
||||
Reference in New Issue
Block a user