boeledi / RangeSlider

RangeSlider Widget for Flutter
Other
374 stars 67 forks source link

Another exception was thrown: 'package:flutter_range_slider/src/flutter_range_slider.dart': Failed assertion: line 112 pos 16: 'upperValue >= lowerValue && upperValue <= max': is not true #29

Open umairali435 opened 4 years ago

umairali435 commented 4 years ago

This is the issue i am faced... i dont know how to solve it....

boeledi commented 4 years ago

Could you please provide me with the parameters you pass to the RangeSlider?

umairali435 commented 4 years ago

i give lower value to 0.0 and upper is 400.0; when i drag from right to left and cross the left it shows red screen..i know its not ok to be like this ....but a user might be drag to the left double _lowerValue = 0.0; double _upperValue = 400.0; frs.RangeSlider(

                          min: 0.0,
                          max: 400.0,
                          lowerValue: _lowerValue,
                          upperValue: _upperValue,
                          divisions: _upperValue.toInt(),
                          showValueIndicator: true,
                          valueIndicatorMaxDecimals: 1,
                          onChanged:
                              (double newLowerValue, double newUpperValue) {
                            setState(() {
                              _upperValue = newUpperValue;
                            });
                          },
                          onChangeStart: (double startLowerValue,
                              double startUpperValue) {
                            print(
                                'Started with values: $startLowerValue hand $startUpperValue');
                          },
                          onChangeEnd:
                              (double newLowerValue, double newUpperValue) {
                            print(
                                'Ended with values: $newLowerValue land $newUpperValue');
                          },
                        ),
                      ),