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

Allow to load resource from AssetBundle without BuildContext #27

Closed
camillo777 opened this issue Mar 30, 2020 · 2 comments
Closed

Allow to load resource from AssetBundle without BuildContext #27

camillo777 opened this issue Mar 30, 2020 · 2 comments

Comments

@camillo777
Copy link

Hello, does this package also allows to load resources from AssetBundle without the need of Context?
It could be useful as well!
Currently the only way to load a resource from assets folder needs a BuildContext.

Thank you
Camillo

@jonataslaw
Copy link
Owner

Hello, does this package also allows to load resources from AssetBundle without the need of Context?
It could be useful as well!
Currently the only way to load a resource from assets folder needs a BuildContext.

Thank you
Camillo

Have you tried using Get.context instead of context?
It provides the current BuildContext.
If it doesn't work with it, there is probably no way to do it (sometimes, a context is needed that is not linked to the navigation context, which is the case with Get, in which case, there is nothing to do).

@jonataslaw
Copy link
Owner

I will close this because in the new version, Get.context meets all needs of using context outside the tree where this is possible, but if you have another problem or doubt, do not hesitate to open another issue.

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