File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -191,8 +191,18 @@ class FormBuilderRangeSlider extends FormBuilderFieldDecoration<RangeValues> {
191
191
}) : super (builder: (FormFieldState <RangeValues ?> field) {
192
192
final state = field as _FormBuilderRangeSliderState ;
193
193
final effectiveNumberFormat = numberFormat ?? NumberFormat .compact ();
194
- if (initialValue == null ) {
195
- field.setValue (RangeValues (min, min));
194
+ if (field.value == null ||
195
+ field.value! .start < min ||
196
+ field.value! .start > max ||
197
+ field.value! .end < min ||
198
+ field.value! .end > max) {
199
+ if (initialValue == null ) {
200
+ state.setValue (RangeValues (min, min));
201
+ } else {
202
+ state.setValue (
203
+ RangeValues (initialValue.start, initialValue.end),
204
+ );
205
+ }
196
206
}
197
207
return InputDecorator (
198
208
decoration: state.decoration,
You can’t perform that action at this time.
0 commit comments