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

Not work in isolate #30

Open
H3mnz opened this issue Aug 6, 2022 · 2 comments
Open

Not work in isolate #30

H3mnz opened this issue Aug 6, 2022 · 2 comments

Comments

@H3mnz
Copy link

H3mnz commented Aug 6, 2022

when using in isolate this error happen
try adding WidgetsFlutterBinding.ensureInitialized() in main method but not fix.

Binding has not yet been initialized.
The "instance" getter on the ServicesBinding binding mixin is only available once that binding has been initialized.
Typically, this is done by calling "WidgetsFlutterBinding.ensureInitialized()" or "runApp()" (the latter calls the former). Typically this call is done in the "void main()" method. The "ensureInitialized" method is idempotent; calling it multiple times is not harmful. After calling that method, the "instance" getter will return the binding.
In a test, one can call "TestWidgetsFlutterBinding.ensureInitialized()" as the first line in the test's "main()" method to initialize the binding.

@nathnaeld
Copy link

I counter the same problem. I thought this package has no Widgets.

@xenSlayer
Copy link

any fix. had the same issue. using this package for getting metadata of multiple files completely freezes the UI. Is there any alternatives?

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

3 participants