semanticFormatterCallback property
The callback used to create a semantic value from the slider's values.
This is used by accessibility frameworks like TalkBack on Android to inform users what the currently selected value is with more context.
In the example below, a range slider for currency values is configured to announce a value with a currency label.
SfRangeValues _values = SfRangeValues(40.0, 60.0);
SfRangeSlider(
min: 0.0,
max: 100.0,
values: _values,
interval: 20,
stepSize: 10,
semanticFormatterCallback: (dynamic value, SfThumb thumb) {
return 'The $thumb value is ${value}';
}
onChanged: (dynamic newValues) {
setState(() {
_values = newValues;
});
},
)
Implementation
final RangeSliderSemanticFormatterCallback? semanticFormatterCallback;