WT1.1.22+5 matic events

This commit is contained in:
bossanyit
2021-09-05 22:11:45 +02:00
parent e34add8185
commit 4e9afbd4b3
12 changed files with 67 additions and 49 deletions
+7 -4
View File
@@ -763,19 +763,22 @@ class Cache with Logging {
setTrainingPlanDays(value) => this._trainingPlanDays = value;
bool canTrial() {
bool can = true;
if (Cache().userLoggedIn == null) {
return false;
can = false;
}
for (var element in _purchases) {
if (element.customerId == Cache().userLoggedIn!.customerId) {
return false;
can = false;
}
}
if (userLoggedIn!.trialDate != null) {
return false;
can = false;
}
return true;
print("Can Trial $can");
return can;
}
}
+4
View File
@@ -8,6 +8,8 @@ class Mautic {
int? databaseId;
String? subscriptionDate;
String? language;
String? purchaseDate;
String? exerciseDate;
Map<String, dynamic> toJson() => {
"formId": this.formId,
@@ -31,6 +33,8 @@ class Mautic {
form += this.subscriptionDate == null ? "" : "&mauticform[subscribed]=${this.subscriptionDate}";
form += this.databaseId == null ? "" : "&mauticform[database_id]=${this.databaseId}";
form += this.language == null ? "" : "&mauticform[language]=${this.language}";
form += this.purchaseDate == null ? "" : "&mauticform[purchase_date]=${this.purchaseDate}";
form += this.exerciseDate == null ? "" : "&mauticform[last_exercise]=${this.exerciseDate}";
return form;
}