Closed Throvn closed 3 years ago
Did some more digging, and as it turns out, it is not possible to call platform specific through platform channels in isolates. Found this issue which is still open: https://github.com/flutter/flutter/issues/13937
So I the best workaround to my is to let the main isolate call the platform channels.
After testing this with other plugins who also use MethodChannels, I can confirm that this is not an issue with the library but rather with Isolates. Closing this issue now.
First of all... Love this package. Thank you for all of the work you put in so far.
Now to my problem: Everything worked like a charm, but since the barcode detection process is pretty heavy, I want to outsource this process in a seperate
Isolate
. Here is my stripped (pseudo) code:After the refactoring I get the following error:
Exception: Null check operator used on a null value
After a bit of digging, I am pretty sure that this is because of the following line:The
reply
is null.So is it possible to do the recognition in a seperate Isolate? or how can I fix this issue? Any help or hints is appreciated. If you need more information just let me know :).
Best regards, Louis :)