mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Rename some constants so they are the same as in the react app
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<WorkoutPlan> getPlans() {
|
||||
|
||||
Reference in New Issue
Block a user