alexmercerind / flutter_media_metadata

A Flutter plugin to read 🔖 metadata of 🎵 media files. Supports Windows, Linux, macOS, Android, iOS & Web.
MIT License
69 stars 35 forks source link

Not work in isolate #30

Open H3mnz opened 2 years ago

H3mnz commented 2 years ago

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 commented 1 year ago

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

xenSlayer commented 1 year ago

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