Explorar el Código

Fix disposing camera from memory

flutter-beta
Paweł Kuźniak hace 6 años
committed by Dominik Spicher
padre
commit
243188bd9e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      ios/Classes/QRView.swift

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

@@ -23,11 +23,11 @@ public class QRView:NSObject,FlutterPlatformView {
func isCameraAvailable(success: Bool) -> Void {
if success {
do {
try scanner?.startScanning(resultBlock: { codes in
try scanner?.startScanning(resultBlock: { [weak self] codes in
if let codes = codes {
for code in codes {
guard let stringValue = code.stringValue else { continue }
self.channel.invokeMethod("onRecognizeQR", arguments: stringValue)
self?.channel.invokeMethod("onRecognizeQR", arguments: stringValue)
}
}
})


Cargando…
Cancelar
Guardar