diff --git a/lib/helpers/consts.dart b/lib/helpers/consts.dart index 2bc41c599..8d31d87d6 100644 --- a/lib/helpers/consts.dart +++ b/lib/helpers/consts.dart @@ -57,3 +57,6 @@ const AVAILABLE_PLATES = [1.25, 2.5, 5, 10, 15]; /// Weight of the bar, used in the plate calculator const BAR_WEIGHT = 20; + +/// ID of the equipment entry for barbell +const ID_EQUIPMENT_BARBELL = 1; diff --git a/lib/widgets/workouts/gym_mode.dart b/lib/widgets/workouts/gym_mode.dart index a8ea45ccc..40138282e 100644 --- a/lib/widgets/workouts/gym_mode.dart +++ b/lib/widgets/workouts/gym_mode.dart @@ -505,7 +505,6 @@ class _LogPageState extends State { } Widget getPlates() { - //final plates = []; final plates = plateCalculator( double.parse(_weightController.text), BAR_WEIGHT, @@ -556,7 +555,9 @@ class _LogPageState extends State { ? getPastLogs() : Container()), SizedBox(height: 15), - getPlates(), + // Only show calculator for barbell + if (widget._log.exerciseObj.equipment.map((e) => e.id).contains(ID_EQUIPMENT_BARBELL)) + getPlates(), Padding( padding: const EdgeInsets.symmetric(horizontal: 15), child: Card(