gabrielpacheco23 / google-translator

Free Google Translator for Dart
https://pub.dartlang.org/packages/translator
MIT License
170 stars 90 forks source link

Instance of '_Future<dynamic>' instead of text #44

Open bachowsky opened 3 years ago

bachowsky commented 3 years ago

Future translate(String input) async { final translator = GoogleTranslator(); var result; var translation = await translator .translate(input, to: 'tr') .then((value) => {result = value}); return result; }

this scope gives me Instance of '_Future' but i want to get that translated text.