-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Usage in background/isolate #198
Comments
@kuhnroyal What is the problem of transferring ready-made translated data to isolate? |
I am generating a PDF in a background isolate. The app might not be running so I can no access the |
@kuhnroyal you can pass context to isolate and work with translations |
That is my problem, I don't have a context. |
@kuhnroyal you try past context in constructor? This is just an assumption, I did not work with isolates.. |
The BuildContext is only available when the app is actually running. In a background service there is no BuildContext. I need to get the |
If the |
@kuhnroyal you can import them. Since they aren't public, they don't show up in Autocomplete/Quick Fix from the IDE, but you can type the import by hand:
and use classes from those files. |
If you wrote, can you share it on your github account? |
Did you manage to do that? I have the exact same problem, typically happens for background notifications, where |
I tried it works. Thanks. |
I didn't find a way to access the translations without a Widget tree, for example in a background isolate. All the initialization is happening in the
EasyLocalization
class and everything is private.Is there a way to achieve something like this or is such support planned?
The text was updated successfully, but these errors were encountered: