File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,12 @@ const DEFAULT_WEIGHT_UNIT = 1;
36
36
/// Default impression for a workout session (neutral)
37
37
const DEFAULT_IMPRESSION = 2 ;
38
38
39
- /// Default weight unit is "repetition"
40
- const DEFAULT_REPETITION_UNIT = 1 ;
39
+ // Weight and repetition units for the workout logs
40
+ const REP_UNIT_REPETITIONS = 1 ;
41
+ const REP_UNIT_TILL_FAILURE = 2 ;
42
+
43
+ const WEIGHT_UNIT_KG = 1 ;
44
+ const WEIGHT_UNIT_LB = 2 ;
41
45
42
46
/// Time to locally cache values such as ingredients, etc
43
47
const DAYS_TO_CACHE = 20 ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ String repText(
42
42
// rather "8 repetitions". If there is weight we want to output "8 x 50kg",
43
43
// since the repetitions are implied. If other units are used, we always
44
44
// print them
45
- if (repetitionUnitObj.id != DEFAULT_REPETITION_UNIT || weight == 0 || weight == null ) {
45
+ if (repetitionUnitObj.id != REP_UNIT_REPETITIONS || weight == 0 || weight == null ) {
46
46
out.add (repetitionUnitObj.name);
47
47
}
48
48
}
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ class WorkoutPlansProvider with ChangeNotifier {
85
85
86
86
/// Return the default weight unit (reps)
87
87
RepetitionUnit get defaultRepetitionUnit {
88
- return _repetitionUnit.firstWhere ((element) => element.id == DEFAULT_REPETITION_UNIT );
88
+ return _repetitionUnit.firstWhere ((element) => element.id == REP_UNIT_REPETITIONS );
89
89
}
90
90
91
91
List <WorkoutPlan > getPlans () {
You can’t perform that action at this time.
0 commit comments