translate method

Future<String> translate(
  1. String text
)

Implementation

Future<String> translate(String text) async {
  try {
    return await channel.invokeMethod('translate', <String, dynamic>{
      'from': from,
      'to': to,
      'text': text,
      'isDownloadRequireWifi': isDownloadRequireWifi,
    });
  } on PlatformException catch (e) {
    print(e.message);
    return text;
  }
}