Avoid null values for slider
This commit is contained in:
parent
b40880c85a
commit
7c473eb1ca
@ -41,9 +41,9 @@ class UniversalSliderState extends State<UniversalSlider> {
|
|||||||
row.add(
|
row.add(
|
||||||
Flexible(
|
Flexible(
|
||||||
child: Slider(
|
child: Slider(
|
||||||
value: _value,
|
value: _value ?? math.max(widget.max ?? 100, _value ?? 0),
|
||||||
min: widget.min,
|
min: widget.min ?? 0,
|
||||||
max: widget.max,
|
max: widget.max ?? 100,
|
||||||
onChangeStart: (_) {
|
onChangeStart: (_) {
|
||||||
_changeStarted = true;
|
_changeStarted = true;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user