Merge branch 'wger-project:master' into yhm/issue-731

This commit is contained in:
Yashas H Majmudar
2025-03-28 22:37:26 -04:00
committed by GitHub
3 changed files with 2 additions and 5 deletions

View File

@@ -34,9 +34,6 @@ const TESTSERVER_PASSWORD = 'flutteruser';
/// Keys used in the android manifest
const MANIFEST_KEY_CHECK_UPDATE = 'wger.check_min_app_version';
/// Default weight unit is "kg"
const WEIGHT_UNIT_KG_ID = 1;
/// Default impression for a workout session (neutral)
const DEFAULT_IMPRESSION = 2;

View File

@@ -173,7 +173,7 @@ class SlotEntry {
this.type = type ?? 'normal';
exerciseObj = exercise;
exerciseId = exercise.id!;
this.weightUnitId = weightUnitId ?? WEIGHT_UNIT_KG_ID;
this.weightUnitId = weightUnitId ?? WEIGHT_UNIT_KG;
this.weightRounding = weightRounding ?? 2.5;
this.repetitionUnitId = repetitionUnitId ?? REP_UNIT_REPETITIONS_ID;

View File

@@ -106,7 +106,7 @@ class RoutinesProvider with ChangeNotifier {
/// Return the default weight unit (kg)
WeightUnit get defaultWeightUnit {
return _weightUnits.firstWhere((element) => element.id == WEIGHT_UNIT_KG_ID);
return _weightUnits.firstWhere((element) => element.id == WEIGHT_UNIT_KG);
}
WeightUnit findWeightUnitById(int id) => _weightUnits.firstWhere((element) => element.id == id);