WT 1.1.24+5 training plan fixes
This commit is contained in:
@@ -31,7 +31,7 @@ import 'package:aitrainer_app/util/enums.dart';
|
||||
import 'package:aitrainer_app/util/env.dart';
|
||||
import 'package:aitrainer_app/util/track.dart';
|
||||
import 'package:firebase_remote_config/firebase_remote_config.dart';
|
||||
import 'package:flurry_data/flurry_data.dart';
|
||||
//import 'package:flurry_data/flurry_data.dart';
|
||||
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
|
||||
import 'package:flutter_uxcam/flutter_uxcam.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
@@ -689,7 +689,7 @@ class Cache with Logging {
|
||||
await PackageApi().getCustomerPackage(customerId);
|
||||
|
||||
if (!isInDebugMode) {
|
||||
FlurryData.setUserId(customerId.toString());
|
||||
//FlurryData.setUserId(customerId.toString());
|
||||
FlutterUxcam.setUserProperty("username", customerId.toString());
|
||||
FlutterUxcam.setUserIdentity(customerId.toString());
|
||||
Smartlook.setUserIdentifier(customerId.toString());
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'dart:collection';
|
||||
import 'dart:convert';
|
||||
import 'package:aitrainer_app/util/common.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import 'package:aitrainer_app/model/customer_training_plan_details.dart';
|
||||
@@ -61,6 +62,9 @@ class CustomerTrainingPlan {
|
||||
|
||||
Iterable iterable = jsonDecode(jsonDetails);
|
||||
this.details = iterable.map((detail) => CustomerTrainingPlanDetails.fromJsonWithExerciseList(detail)).toList();
|
||||
this.details.forEach((detail) {
|
||||
detail.alternatives = Common.getExerciseTypeAlternatives(detail.exerciseTypeId);
|
||||
});
|
||||
} on Exception catch (e) {
|
||||
print("JsonDecode error " + e.toString());
|
||||
}
|
||||
|
||||
@@ -38,7 +38,9 @@ class CustomerTrainingPlanDetails {
|
||||
|
||||
bool isTest = false;
|
||||
|
||||
double base1RM = -1;
|
||||
double baseOneRepMax = -1;
|
||||
|
||||
List<ExerciseType> alternatives = [];
|
||||
|
||||
CustomerTrainingPlanDetails();
|
||||
|
||||
@@ -92,7 +94,7 @@ class CustomerTrainingPlanDetails {
|
||||
|
||||
this.exerciseType = Cache().getExerciseTypeById(exerciseTypeId!);
|
||||
|
||||
this.base1RM = json['base1RM'];
|
||||
this.baseOneRepMax = json['baseOneRepMax'];
|
||||
}
|
||||
|
||||
ExerciseType? getExerciseType() => exerciseType;
|
||||
@@ -122,7 +124,7 @@ class CustomerTrainingPlanDetails {
|
||||
'state': this.state.toStr(),
|
||||
"isTest": this.isTest,
|
||||
"dayId": this.dayId,
|
||||
"base1RM": this.base1RM,
|
||||
"baseOneRepMax": this.baseOneRepMax,
|
||||
};
|
||||
|
||||
//print("Detail toJson $jsonMap");
|
||||
@@ -147,5 +149,6 @@ class CustomerTrainingPlanDetails {
|
||||
this.isTest = from.isTest;
|
||||
this.day = from.day;
|
||||
this.dayId = from.dayId;
|
||||
this.baseOneRepMax = from.baseOneRepMax;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ class TrainingEvaluationExercise {
|
||||
int? repeats;
|
||||
int? maxRepeats;
|
||||
|
||||
int? totalLift;
|
||||
int? maxTotalLift;
|
||||
double? totalLift;
|
||||
double? maxTotalLift;
|
||||
|
||||
double? oneRepMax;
|
||||
double? max1RM;
|
||||
|
||||
Reference in New Issue
Block a user