semanticFormatterCallback property
The callback used to create a semantic value from the selector'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 selector for currency values is configured to announce a value with a currency label.
SfRangeValues _values = SfRangeValues(40.0, 60.0);
SfRangeSelector(
min: 0.0,
max: 100.0,
initialValues: _values,
interval: 20,
stepSize: 10,
semanticFormatterCallback: (dynamic value, SfThumb thumb) {
return 'The $thumb value is ${value}';
},
child: Container(
height: 150,
color: Colors.pink[200],
),
)
Implementation
final RangeSelectorSemanticFormatterCallback? semanticFormatterCallback;