boeledi / RangeSlider

RangeSlider Widget for Flutter
Other
374 stars 67 forks source link

lowerValue and upperValue most be as String #13

Closed mohrezani closed 5 years ago

mohrezani commented 5 years ago

hi i want to set slider range for money range! and i cant set value as decimal format! I think it was better set as String :\

boeledi commented 5 years ago

Hi,

Could you please elaborate a bit more about the problem you are facing? Especially, I don't understand your statement "I can't set value as decimal format"...

Thanks

mohrezani commented 5 years ago

I need to display the lowerValue and upperValue in the string format , for example : "1,000 euro" and "10,000 euro". slider

boeledi commented 5 years ago

Hi, normally there is no longer any problem doing this with the version I posted on Feb 16th 2019 (version 1.1.0)

Use the valueIndicatorFormatter callback, as follows:

valueIndicatorFormatter: (int index, double value){ return '${value.toStringAsFixed(0)} euro'; }

This should solve your issue. For more information, have a look at the example.

Regards,

mohrezani commented 5 years ago

Hi, normally there is no longer any problem doing this with the version I posted on Feb 16th 2019 (version 1.1.0)

Use the valueIndicatorFormatter callback, as follows:

valueIndicatorFormatter: (int index, double value){ return '${value.toStringAsFixed(0)} euro'; }

This should solve your issue. For more information, have a look at the example.

Regards,

thanks :)