WT 1.1.24+5 training plan fixes

This commit is contained in:
bossanyit
2021-11-05 18:40:58 +01:00
parent e8fc6cd7ec
commit 4c5aff91db
23 changed files with 263 additions and 126 deletions
+21
View File
@@ -225,4 +225,25 @@ mixin Common {
"Initial 1RM: $initialRM repeat: $repeat changedRepeat: $changedRepeats Weight: $weight weightWendler: $weightWendler weight Oconner: $weightOconner. NEW WEIGHT: $newWeight");
return newWeight;
}
static List<ExerciseType> getExerciseTypeAlternatives(int? exerciseTypeId) {
if (exerciseTypeId == null || exerciseTypeId <= 0) {
return [];
}
List<ExerciseType> list = [];
List<ExerciseType>? exerciseTypes = Cache().getExerciseTypes();
if (exerciseTypes != null) {
exerciseTypes.forEach((exerciseType) {
if (exerciseType.alternatives.isNotEmpty) {
exerciseType.alternatives.forEach((childId) {
if (childId == exerciseTypeId) {
list.add(exerciseType);
}
});
}
});
}
return list;
}
}
+2 -2
View File
@@ -6,7 +6,7 @@ import 'package:aitrainer_app/util/enums.dart';
import 'package:aitrainer_app/model/tracking.dart' as model;
import 'package:firebase_analytics/firebase_analytics.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flurry_data/flurry_data.dart';
//import 'package:flurry_data/flurry_data.dart';
import 'package:flutter_uxcam/flutter_uxcam.dart';
import 'package:smartlook/smartlook.dart';
@@ -22,7 +22,7 @@ class Track with Logging {
void track(TrackingEvent event, {String eventValue = ""}) {
if (!isInDebugMode) {
FlurryData.logEvent(event.enumToString());
//FlurryData.logEvent(event.enumToString());
Smartlook.setGlobalEventProperty(event.toString(), eventValue, false);
FlutterUxcam.logEventWithProperties(event.enumToString(), {"value": eventValue});
model.Tracking tracking = model.Tracking();