In my Dart program I am using the camera:
...
final File imageProduct = await ImagePicker.pickImage(source: ImageSource.camera, maxHeight: 1024, maxWidth: 1024);
...
In previous version it worked well, now after a Flutter upgrade (v1.7.8+hotfix.3) the camera interface is displayed, I can take the photo, after that I get error:
W/Binder ( 7331): Caught a RuntimeException from the binder stub implementation.
W/Binder ( 7331): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Binder:7331_4
In Flutter asynchronous functions are executed in main thread so I really don't understand what could be the problem. I couldn't find an explicit way to force execution in main thread.
What could be the solution.
Thanks.