identifyLanguage method
Identifies the language of the given text
.
If no language could be determined then undeterminedLanguageCode is returned.
More information: https://developers.google.com/ml-kit/language/identification
Implementation
Future<String> identifyLanguage(String text) async {
final result = await _channel
.invokeMethod('nlp#startLanguageIdentifier', <String, dynamic>{
'text': text,
'possibleLanguages': false,
'confidence': confidenceThreshold,
'id': id,
});
return result.toString();
}