getVoice method
Get list of supported voices
Implementation
@override
Future<List<String>?> getVoice() {
List<String> voices = <String>[];
JsArray<dynamic>? voiceArray = _getVoices();
if (voiceArray != null) {
for (dynamic voice in voiceArray) {
if (voice != null) {
voices.add(voice['name']);
}
}
}
return Future.value(voices);
}