semanticFormatterCallback property

SfSliderSemanticFormatterCallback? semanticFormatterCallback

The callback used to create a semantic value from the slider's value.

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 slider value is configured to announce a value in dollar.

double _value = 40.0;

  min: 0.0,
  max: 100.0,
  value: _value,
  interval: 20,
  stepSize: 10,
  semanticFormatterCallback: (dynamic value) {
    return '${value} dollars';
  onChanged: (dynamic newValue) {
    setState(() {
     _value = newValue;


final SfSliderSemanticFormatterCallback? semanticFormatterCallback;