@@ -133,68 +133,66 @@ class FormBuilderRangeSlider extends FormBuilderField<RangeValues> {
133
133
this .maxTextStyle,
134
134
this .numberFormat,
135
135
this .shouldRequestFocus = false ,
136
- }) : super (
137
- builder: (FormFieldState <RangeValues ?> field) {
138
- final state = field as _FormBuilderRangeSliderState ;
139
- final effectiveNumberFormat =
140
- numberFormat ?? NumberFormat .compact ();
136
+ }) : super (builder: (FormFieldState <RangeValues ?> field) {
137
+ final state = field as _FormBuilderRangeSliderState ;
138
+ final effectiveNumberFormat = numberFormat ?? NumberFormat .compact ();
141
139
142
- return InputDecorator (
143
- decoration: state.decoration,
144
- child: Container (
145
- padding: const EdgeInsets .only (top: 10.0 ),
146
- child: Column (
147
- crossAxisAlignment: CrossAxisAlignment .start,
148
- children: [
149
- RangeSlider (
150
- values: field.value ?? RangeValues (min, min),
151
- min: min,
152
- max: max,
153
- divisions: divisions,
154
- activeColor: activeColor,
155
- inactiveColor: inactiveColor,
156
- onChangeEnd: onChangeEnd,
157
- onChangeStart: onChangeStart,
158
- labels: labels,
159
- semanticFormatterCallback: semanticFormatterCallback,
160
- onChanged: state.enabled
161
- ? (values) {
162
- if (shouldRequestFocus) {
163
- state.requestFocus ();
164
- }
165
- field.didChange (values);
166
- }
167
- : null ,
168
- ),
169
- Row (
170
- children: < Widget > [
171
- if (displayValues != DisplayValues .none &&
172
- displayValues != DisplayValues .current)
173
- Text (
174
- effectiveNumberFormat.format (min),
175
- style: minTextStyle ?? textStyle,
176
- ),
177
- const Spacer (),
178
- if (displayValues != DisplayValues .none &&
179
- displayValues != DisplayValues .minMax)
180
- Text (
181
- '${effectiveNumberFormat .format (field .value !.start )} - ${effectiveNumberFormat .format (field .value !.end )}' ,
182
- style: textStyle,
183
- ),
184
- const Spacer (),
185
- if (displayValues != DisplayValues .none &&
186
- displayValues != DisplayValues .current)
187
- Text (
188
- effectiveNumberFormat.format (max),
189
- style: maxTextStyle ?? textStyle,
190
- ),
191
- ],
192
- ),
140
+ return InputDecorator (
141
+ decoration: state.decoration,
142
+ child: Container (
143
+ padding: const EdgeInsets .only (top: 10.0 ),
144
+ child: Column (
145
+ crossAxisAlignment: CrossAxisAlignment .start,
146
+ children: [
147
+ RangeSlider (
148
+ values: field.value ?? RangeValues (min, min),
149
+ min: min,
150
+ max: max,
151
+ divisions: divisions,
152
+ activeColor: activeColor,
153
+ inactiveColor: inactiveColor,
154
+ onChangeEnd: onChangeEnd,
155
+ onChangeStart: onChangeStart,
156
+ labels: labels,
157
+ semanticFormatterCallback: semanticFormatterCallback,
158
+ onChanged: state.enabled
159
+ ? (values) {
160
+ if (shouldRequestFocus) {
161
+ state.requestFocus ();
162
+ }
163
+ field.didChange (values);
164
+ }
165
+ : null ,
166
+ ),
167
+ Row (
168
+ children: < Widget > [
169
+ if (displayValues != DisplayValues .none &&
170
+ displayValues != DisplayValues .current)
171
+ Text (
172
+ effectiveNumberFormat.format (min),
173
+ style: minTextStyle ?? textStyle,
174
+ ),
175
+ const Spacer (),
176
+ if (displayValues != DisplayValues .none &&
177
+ displayValues != DisplayValues .minMax)
178
+ Text (
179
+ '${effectiveNumberFormat .format (field .value !.start )} - ${effectiveNumberFormat .format (field .value !.end )}' ,
180
+ style: textStyle,
181
+ ),
182
+ const Spacer (),
183
+ if (displayValues != DisplayValues .none &&
184
+ displayValues != DisplayValues .current)
185
+ Text (
186
+ effectiveNumberFormat.format (max),
187
+ style: maxTextStyle ?? textStyle,
188
+ ),
193
189
],
194
190
),
195
- ),
196
- );
197
- });
191
+ ],
192
+ ),
193
+ ),
194
+ );
195
+ });
198
196
199
197
@override
200
198
FormBuilderFieldState <FormBuilderRangeSlider , RangeValues > createState () =>
0 commit comments