From 9997252e1ef4fa2fcf6ed6a98300e40f844c12eb Mon Sep 17 00:00:00 2001 From: Marko Milosevic Date: Sat, 30 Oct 2021 18:24:10 +0200 Subject: [PATCH] Removing final keyword for the RiR slider properties --- lib/widgets/workouts/forms.dart | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/widgets/workouts/forms.dart b/lib/widgets/workouts/forms.dart index 27ed57288..9a1be6b61 100644 --- a/lib/widgets/workouts/forms.dart +++ b/lib/widgets/workouts/forms.dart @@ -746,8 +746,8 @@ class WeightInputWidget extends StatelessWidget { /// Can be used with a Setting or a Log object class RiRInputWidget extends StatefulWidget { final dynamic _setting; - late final String dropdownValue; - late final double _currentSetSliderValue; + late String dropdownValue; + late double _currentSetSliderValue; static const SLIDER_START = -0.5; @@ -771,8 +771,6 @@ class RiRInputWidget extends StatefulWidget { } class _RiRInputWidgetState extends State { - late double currentSetSliderValueMutable = widget._currentSetSliderValue; - /// Returns the string used in the slider String getSliderLabel(double value) { if (value < 0) { @@ -802,15 +800,15 @@ class _RiRInputWidgetState extends State { Text(AppLocalizations.of(context).rir), Expanded( child: Slider( - value: currentSetSliderValueMutable, + value: widget._currentSetSliderValue, min: RiRInputWidget.SLIDER_START, max: (Setting.POSSIBLE_RIR_VALUES.length - 2) / 2, divisions: Setting.POSSIBLE_RIR_VALUES.length - 1, - label: getSliderLabel(currentSetSliderValueMutable), + label: getSliderLabel(widget._currentSetSliderValue), onChanged: (double value) { widget._setting.setRir(mapDoubleToAllowedRir(value)); setState(() { - currentSetSliderValueMutable = value; + widget._currentSetSliderValue = value; }); }, ),