start static method

Future<PreviewDetails> start({
  1. required int width,
  2. required int height,
  3. required ValueChanged<String?> qrCodeHandler,
  4. CameraDirection cameraDirection = CameraDirection.BACK,
  5. List<BarcodeFormats>? formats = defaultBarcodeFormats,
})

Start the QR reading. Attempts to find the closest camera resolution for the given width/height, chooses the appropriate direction, and tells the framework which formats to listen to.

Implementation

static Future<PreviewDetails> start({
  required int width,
  required int height,
  required ValueChanged<String?> qrCodeHandler,
  CameraDirection cameraDirection = CameraDirection.BACK,
  List<BarcodeFormats>? formats = defaultBarcodeFormats,
}) async {
  return QrMobileVisionPlatform.instance.start(
    width: width,
    height: height,
    qrCodeHandler: qrCodeHandler,
    cameraDirection: cameraDirection,
    formats: formats,
  );
}