announce method

Future<void> announce (String message, TextDirection textDirection)

Sends a semantic announcement.

This should be used for announcement that are not seamlessly announced by the system as a result of a UI state change.

For example a camera application can use this method to make accessibility announcements regarding objects in the viewfinder.

Implementation

static Future<void> announce(String message, TextDirection textDirection) async {
  final AnnounceSemanticsEvent event = AnnounceSemanticsEvent(message, textDirection);
  await SystemChannels.accessibility.send(event.toMap());
}