Accessibility in Flutter Linear Gauge (SfLinearGauge)
16 Jul 20211 minute to read
Screen reader
The SfLinearGauge
can be accessed by the screen readers by wrapping the SfLinearGauge
widget to the Semantics
widget.
double _value = 50;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Semantics(
label: 'Syncfusion Flutter Linear Gauge',
value: _value.toString(),
child:
SfLinearGauge(markerPointers: [LinearShapePointer(value: _value)]),
),
);
}
Sufficient contrast
You can customize the color of the SfLinearGauge
elements using the following APIs for the sufficient contrast.
Axis solid color
Axis gradient
Ticks
Labels
Range
Radial gradient
Linear gradient
Sweep gradient
Bar pointer
Marker
Large fonts
You can change the font size of the SfLinearGauge
elements using the following API:
Easily touch targets
The SfLinearGauge
has touch target as 48 * 48 as per the standard for all the elements.