speak method

Future speak(
  1. String text, {
  2. bool focus = false,
})

Future which invokes the platform specific method for speaking

Implementation

Future<dynamic> speak(String text, {bool focus = false}) async {
  if (!kIsWeb && Platform.isAndroid) {
    return await _channel.invokeMethod('speak', <String, dynamic>{
      "text": text,
      "focus": focus,
    });
  } else {
    return await _channel.invokeMethod('speak', text);
  }
}