diff --git a/lib/helpers/consts.dart b/lib/helpers/consts.dart index 4dcfb723..84f148b3 100644 --- a/lib/helpers/consts.dart +++ b/lib/helpers/consts.dart @@ -36,8 +36,12 @@ const DEFAULT_WEIGHT_UNIT = 1; /// Default impression for a workout session (neutral) const DEFAULT_IMPRESSION = 2; -/// Default weight unit is "repetition" -const DEFAULT_REPETITION_UNIT = 1; +// Weight and repetition units for the workout logs +const REP_UNIT_REPETITIONS = 1; +const REP_UNIT_TILL_FAILURE = 2; + +const WEIGHT_UNIT_KG = 1; +const WEIGHT_UNIT_LB = 2; /// Time to locally cache values such as ingredients, etc const DAYS_TO_CACHE = 20; diff --git a/lib/helpers/misc.dart b/lib/helpers/misc.dart index 805ec1ed..26c34cc2 100644 --- a/lib/helpers/misc.dart +++ b/lib/helpers/misc.dart @@ -42,7 +42,7 @@ String repText( // rather "8 repetitions". If there is weight we want to output "8 x 50kg", // since the repetitions are implied. If other units are used, we always // print them - if (repetitionUnitObj.id != DEFAULT_REPETITION_UNIT || weight == 0 || weight == null) { + if (repetitionUnitObj.id != REP_UNIT_REPETITIONS || weight == 0 || weight == null) { out.add(repetitionUnitObj.name); } } diff --git a/lib/providers/workout_plans.dart b/lib/providers/workout_plans.dart index f00048a4..47dcea35 100644 --- a/lib/providers/workout_plans.dart +++ b/lib/providers/workout_plans.dart @@ -85,7 +85,7 @@ class WorkoutPlansProvider with ChangeNotifier { /// Return the default weight unit (reps) RepetitionUnit get defaultRepetitionUnit { - return _repetitionUnit.firstWhere((element) => element.id == DEFAULT_REPETITION_UNIT); + return _repetitionUnit.firstWhere((element) => element.id == REP_UNIT_REPETITIONS); } List getPlans() {