update main model
This commit is contained in:
@@ -9,7 +9,7 @@ List<Day> dayLists = [
|
||||
];
|
||||
|
||||
class Setting {
|
||||
final int? supportBuildNum;
|
||||
final int supportBuildNum;
|
||||
// contact page
|
||||
String? usaAddress;
|
||||
String? mmAddress;
|
||||
@@ -27,7 +27,7 @@ class Setting {
|
||||
List<String> shipmentTypes;
|
||||
|
||||
Setting(
|
||||
{this.supportBuildNum,
|
||||
{this.supportBuildNum = 1,
|
||||
this.usaAddress,
|
||||
this.mmAddress,
|
||||
this.usaContactNumber,
|
||||
|
||||
@@ -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