WT 1.1.26+4 radar chart 1
This commit is contained in:
@@ -424,9 +424,8 @@ class ExerciseRepository {
|
||||
return sumA >= sumB ? 1 : -1;
|
||||
});
|
||||
|
||||
double withCompare = oldExercises.last.unitQuantity != null
|
||||
? oldExercises.last.quantity! * oldExercises.last.unitQuantity!
|
||||
: oldExercises.last.quantity!;
|
||||
double withCompare =
|
||||
oldExercises.last.unitQuantity != null ? oldExercises.last.quantity! * oldExercises.last.unitQuantity! : oldExercises.last.quantity!;
|
||||
|
||||
//result = toCompare >= withCompare ? (1 - toCompare / withCompare) * 100 : (1 - toCompare / withCompare) * -100;
|
||||
//print("Last Best: ${oldExercises.last} - result: $result");
|
||||
@@ -457,9 +456,8 @@ class ExerciseRepository {
|
||||
});
|
||||
|
||||
if (oldExercises.isNotEmpty) {
|
||||
double withCompare = oldExercises.first.unitQuantity != null
|
||||
? oldExercises.first.quantity! * oldExercises.first.unitQuantity!
|
||||
: oldExercises.first.quantity!;
|
||||
double withCompare =
|
||||
oldExercises.first.unitQuantity != null ? oldExercises.first.quantity! * oldExercises.first.unitQuantity! : oldExercises.first.quantity!;
|
||||
|
||||
result = toCompare >= withCompare ? (toCompare / withCompare) * 100 : (1 - toCompare / withCompare) * -100;
|
||||
print("Last Last: ${oldExercises.first} vs. $exercise - - result: $result");
|
||||
@@ -522,4 +520,18 @@ class ExerciseRepository {
|
||||
prevExercise.summary = summary;
|
||||
exerciseLogList!.add(prevExercise);
|
||||
}
|
||||
|
||||
List<Exercise> getExercisesByExerciseTypeId(int exerciseTypeId) {
|
||||
List<Exercise> list = [];
|
||||
List<Exercise>? allExercise = Cache().getExercises();
|
||||
if (allExercise == null) {
|
||||
return list;
|
||||
}
|
||||
allExercise.forEach((element) {
|
||||
if (element.exerciseTypeId == exerciseTypeId) {
|
||||
list.add(element);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user