Explorar el Código

Calling the function with passing the parameters of the width and height of the scanning area for IOS

flutter-beta
Tihomirov hace 4 años
padre
commit
f6ea193af2
Se han modificado 2 ficheros con 4 adiciones y 2 borrados
  1. +2
    -1
      ios/Classes/QRView.swift
  2. +2
    -1
      lib/src/qr_code_scanner.dart

+ 2
- 1
ios/Classes/QRView.swift Ver fichero

@@ -56,7 +56,8 @@ public class QRView:NSObject,FlutterPlatformView {
self?.setDimensions(result,
width: arguments["width"] ?? 0,
height: arguments["height"] ?? 0,
scanArea: arguments["scanArea"] ?? 0,
scanArea: arguments["scanAreaWidth"] ?? 0,
scanArea: arguments["scanAreaHeight"] ?? 0,
scanAreaOffset: arguments["scanAreaOffset"] ?? 0)
case "startScan":
self?.startScan(call.arguments as! Array<Int>, result)


+ 2
- 1
lib/src/qr_code_scanner.dart Ver fichero

@@ -334,7 +334,8 @@ class QRViewController {
await channel.invokeMethod('setDimensions', {
'width': renderBox.size.width,
'height': renderBox.size.height,
'scanArea': overlay?.cutOutWidth ?? 0, //Todo
'scanAreaWidth': overlay?.cutOutWidth ?? 0,
'scanAreaHeight': overlay?.cutOutHeight ?? 0,
'scanAreaOffset': overlay?.cutOutBottomOffset ?? 0
});
return true;


Cargando…
Cancelar
Guardar