translateText method
Implementation
@override
Future<V2TimValueCallback<Map<String, String>>> translateText({
required List<String> texts,
required String targetLanguage,
String? sourceLanguage,
}) async {
Map<String, dynamic> param = {
"texts": texts,
"targetLanguage": targetLanguage,
"sourceLanguage": sourceLanguage ?? "auto",
};
var resp = V2TimValueCallback<Map<String, String>>.fromJson(
formatJson(
await _channel.invokeMethod(
"translateText",
buildMessageMangerParam(
param,
),
),
),
);
log("translateText", param, resp.toLogString());
return resp;
}