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

NoSuchMethodError: The getter 'pressback' was called on null #8

Closed
AlecSPb opened this issue Mar 23, 2020 · 3 comments
Closed

NoSuchMethodError: The getter 'pressback' was called on null #8

AlecSPb opened this issue Mar 23, 2020 · 3 comments

Comments

@AlecSPb
Copy link

AlecSPb commented Mar 23, 2020

My code:
image
My screen:
image

When I write the code: content: Text ("Press back again to exit",), that works.
How do you use this in your application locales?

@ghost
Copy link

ghost commented Mar 24, 2020

I18n.of(context) returns null, so I cannot see how this package influences in this error. As such, if you remove DoubleBackToCloseApp, the error should remain. Try this:

body: Center(
  child: Text(I18n.of(context).pressback),
),

Probably there's something wrong about your i18n set up :)

@AlecSPb
Copy link
Author

AlecSPb commented Apr 6, 2020

body: Center(
  child: Text(I18n.of(context).pressback),
),

This code is't work.
I also tried the Intl plugin. The same error crashes

body: Center(
    child: Text(S.of(context).homeScreenDoubleBackToCloseAppSnackBarText)),

@ghost
Copy link

ghost commented Apr 7, 2020

This code is't work.

As expected. Therefore, your issue is not related to DoubleBackToCloseApp.

Please check your internationalization set up.

@ghost ghost closed this as completed Apr 7, 2020
This issue was closed.
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

1 participant