juliansteenbakker / mobile_scanner

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD 3-Clause "New" or "Revised" License
851 stars 498 forks source link

Investigate switching to camera_android_camerax #630

Open teolemon opened 1 year ago

teolemon commented 1 year ago

What

Google announced a newly released camera_android_camerax (0.5) pub.dev package which switches camera to CameraX (there are still a LOT of things missing, like flash, focus…, but they announce their intention to implemeent it eventually). Overtime, it could reduce maintenance cost of mobile_scanner, and custom code.

It might be worth weighting advantages and effort, and investigating switching to camera_android_camerax https://pub.dev/packages/camera_android_camerax

navaronbracke commented 1 year ago

If we were to switch to camera and defer to that for the texture, we'd have to drop MacOS support, since it's not a supported platform.

However, we could try to use our MacOS implementation as a starting point, to get things landed over there. As a side benefit: camera_windows exists, but I'm not sure if its feature is complete enough yet. I also don't know if Windows has a library for scanning barcodes.

navaronbracke commented 11 months ago

I think that this can be a lot easier to implement once we have the platform interface work set up. See https://github.com/juliansteenbakker/mobile_scanner/issues/401

Then we can rely on camera_android_camerax for the Android implementation, but keep our own implementations for iOS/MacOS as-is (since it only affects Android then)