WT 1.1.22 reengineering: Training Plan execution, registration

This commit is contained in:
bossanyit
2021-08-25 01:05:03 +02:00
parent 6b25fdfe0e
commit cebd83648b
51 changed files with 2605 additions and 663 deletions
+1
View File
@@ -57,6 +57,7 @@ enum TrackingEvent {
training_plan_execute,
training_plan_finished,
training_plan_custom,
trial
}
T enumFromString<T>(Iterable<T> values, String value) {
+3 -1
View File
@@ -46,7 +46,9 @@ class RevenueCatPurchases with Logging {
log("Purchaserinfo not reachable " + e.toString());
}
}
if (Cache().userLoggedIn!.admin == 1) {
bool inTrial = Cache().userLoggedIn!.trialDate != null && DateTime.now().difference(Cache().userLoggedIn!.trialDate!).inDays < 10;
log("Trial mode: $inTrial date: ${Cache().userLoggedIn!.trialDate}");
if (Cache().userLoggedIn!.admin == 1 || inTrial) {
Cache().hasPurchased = true;
}
}
+2 -1
View File
@@ -19,12 +19,13 @@ class Track with Logging {
Track._internal();
void track(TrackingEvent event, {String eventValue = ""}) {
analytics.logEvent(name: event.enumToString(), parameters: {"value": eventValue});
if (!isInDebugMode) {
FlurryData.logEvent(event.toString());
// Smartlook.setGlobalEventProperty(event.toString(), eventValue, false);
FlutterUxcam.logEventWithProperties(event.enumToString(), {"value": eventValue});
model.Tracking tracking = model.Tracking();
analytics.logEvent(name: event.enumToString(), parameters: {"value": eventValue});
//analytics.logEvent(name: event.enumToString(), parameters: {"value": eventValue});
tracking.customerId = Cache().userLoggedIn == null ? 0 : Cache().userLoggedIn!.customerId!;
tracking.event = event.enumToString();
if (eventValue.isNotEmpty) {