update main model

This commit is contained in:
tzw
2021-09-10 15:15:20 +06:30
parent 51a5fe0740
commit 3eacbef117
11 changed files with 68 additions and 70 deletions

View File

@@ -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,

View File

@@ -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) {