WT1.1.22+5 matic events
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user