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(
|
||||
Flexible(
|
||||
child: Slider(
|
||||
value: _value,
|
||||
min: widget.min,
|
||||
max: widget.max,
|
||||
value: _value ?? math.max(widget.max ?? 100, _value ?? 0),
|
||||
min: widget.min ?? 0,
|
||||
max: widget.max ?? 100,
|
||||
onChangeStart: (_) {
|
||||
_changeStarted = true;
|
||||
},
|
||||
|
Reference in New Issue
Block a user