mobile_scanner
mobile_scanner copied to clipboard
[feature-request] Add way to check amount of available cameras on device
I'm currently working on an app that will deploy to both mobile and web, so it'd be useful if there was a way to only show the Switch Camera button if there is actually another camera to switch to. My laptop only has the one, so it's not necessary to have a Switch Camera button on there, but on the app version, where most mobile phones have two, it would be useful.
It would also be nice to have a (static) method to detect if the device even has any camera at all, perhaps to hide camera possibilities in the app that would be there on a device with a camera, but of course have no use on a device without.
We recently implemented the availableCameras field for the MobileScannerState, however, that was only for Android devices initially. I've added this to my checklist in https://github.com/juliansteenbakker/mobile_scanner/issues/968