mockCamera static method

Future<Result<void>> mockCamera(
  1. String imageFileUri, {
  2. bool? refreshOnEachFrame,
  3. bool? requestPermission,
})

Mock camera preview by using static images as a frame source. This is useful for testing purposes.

imageFileUri - The file uri of the image to be used as a mock camera frame. refreshOnEachFrame - If true, the mock camera will refresh the frame on each request, simulating a live camera feed. Default is false. requestPermission - If true, the SDK will request camera permission if not already granted. Android only. Default is false.

Implementation

static Future<Result<void>> mockCamera(String imageFileUri,
    {bool? refreshOnEachFrame, bool? requestPermission}) {
  return ScanbotBarcodeSdkImpl.mockCamera(
      imageFileUri, refreshOnEachFrame, requestPermission);
}