@@ -27,6 +27,10 @@ class FormBuilderSlider extends StatefulWidget {
27
27
final FormFieldSetter onSaved;
28
28
final DisplayValues displayValues;
29
29
30
+ final TextStyle minTextStyle;
31
+ final TextStyle textStyle;
32
+ final TextStyle maxTextStyle;
33
+
30
34
FormBuilderSlider ({
31
35
Key key,
32
36
@required this .attribute,
@@ -48,6 +52,9 @@ class FormBuilderSlider extends StatefulWidget {
48
52
this .numberFormat,
49
53
this .onSaved,
50
54
this .displayValues = DisplayValues .all,
55
+ this .minTextStyle,
56
+ this .textStyle = const TextStyle (),
57
+ this .maxTextStyle,
51
58
}) : super (key: key);
52
59
53
60
@override
@@ -135,15 +142,24 @@ class _FormBuilderSliderState extends State<FormBuilderSlider> {
135
142
children: < Widget > [
136
143
if (widget.displayValues != DisplayValues .none &&
137
144
widget.displayValues != DisplayValues .current)
138
- Text ('${widget .min }' ),
145
+ Text (
146
+ '${_numberFormat .format (widget .min )}' ,
147
+ style: widget.minTextStyle ?? widget.textStyle,
148
+ ),
139
149
Spacer (),
140
150
if (widget.displayValues != DisplayValues .none &&
141
151
widget.displayValues != DisplayValues .minMax)
142
- Text ('${field .value }' ),
152
+ Text (
153
+ '${_numberFormat .format (field .value )}' ,
154
+ style: widget.textStyle,
155
+ ),
143
156
Spacer (),
144
157
if (widget.displayValues != DisplayValues .none &&
145
158
widget.displayValues != DisplayValues .current)
146
- Text ('${widget .max }' ),
159
+ Text (
160
+ '${_numberFormat .format (widget .max )}' ,
161
+ style: widget.maxTextStyle ?? widget.textStyle,
162
+ ),
147
163
],
148
164
),
149
165
],
0 commit comments