getBestCloseRangeScanningLens method

Future<CameraLensType?> getBestCloseRangeScanningLens({
  1. CameraFacing facing = CameraFacing.back,
})

Determine the lens type best suited for close-range scanning.

Returns the CameraLensType whose camera can focus closest to the phone. On iOS 15+, this is based on the minimum focus distance reported by each camera; on platforms or OS versions where that data is not available or not actionable, this returns CameraLensType.normal.

Returns null if the device has no camera for the given facing direction.

Implementation

Future<CameraLensType?> getBestCloseRangeScanningLens({
  CameraFacing facing = CameraFacing.back,
}) {
  throw UnimplementedError(
    'getBestCloseRangeScanningLens() has not been implemented.',
  );
}