'accessibility does not read some text in flutter how to fix that?

In my new flutter app faild on accessibility test. Some text such as hint text and some other text does not recogonize the accessibility. How to fix that ? There is 6 tiles in my home screem every tile contain logo and Text. Text contain both english and thai. Some text are read by Accessibility, some text speech english only. I need to read both English and Thai ?.



Solution 1:[1]

You can use TextSpan.locale to specify which voice that the screen reader should use.

const Text.rich(
  TextSpan(children: [
    TextSpan(text: 'UK text. ', locale: Locale('en', 'UK')),
    TextSpan(text: 'American text. ', locale: Locale('en', 'US')),
    TextSpan(text: 'Dansk text. ', locale: Locale('da', 'DK')),
  ]),
),

Unfortunately this seem to be the only way we can currently affect which voice that assistive technology should use in Flutter.

On Flutter web and windows, TextSpan.locale is currently not working. (issue#98949)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 L--