valueIndicatorFormatter property
External function to format the value to be displayed in the label above the active thumb. Ignored if null.
index
gives the index of the value indicator: 0: lower value, 1: upper value
Sample Code
frs.RangeSlider(
lowerValue: _lowerValue,
upperValue: _upperValue,
min: 1.0,
max: 10.0,
divisions: 10,
valueIndicatorFormatter: (int index, double value){
String threeDecimals = value.toStringAsFixed(3);
return '$threeDecimals m';
},
onChanged: (double newLowerValue, double newUpperValue) {
setState(() {
_lowerValue = newLowerValue;
_upperValue = newUpperValue;
});
},
)
Implementation
final RangeSliderValueIndicatorFormatter? valueIndicatorFormatter;