speakText method

void speakText(
  1. String text
)

Implementation

void speakText(String text) {
  final ctext = text.toNativeUtf16(allocator: calloc).cast<Uint16>();
  final result = _dll.nvdaController_speakText(ctext);
  try {
    if(FAILED(result)) {
      throw NvdaException(result);
    }
  } finally {
    calloc.free(ctext);
  }
}