Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every time it print two times #31

Closed
Tushargupta9800 opened this issue Feb 6, 2021 · 1 comment
Closed

Every time it print two times #31

Tushargupta9800 opened this issue Feb 6, 2021 · 1 comment

Comments

@Tushargupta9800
Copy link

I just copy paste the code written in the Example but when I run the code It translate the Language but it print two times the same String.
The Code:

String input = "Dashboard";
    await translator
        .translate(input, to: 'ar')
        .then((result) => print("$input : $result"));

But I want it print only single time So, whats the error???

@gabrielpacheco23
Copy link
Owner

gabrielpacheco23 commented Feb 8, 2021

You are using await and then(...) in the same sentence, causing it to print the string twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants