Sfoglia il codice sorgente

Fix disposing camera from memory

flutter-beta
Paweł Kuźniak 6 anni fa
committed by Dominik Spicher
parent
commit
243188bd9e
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      ios/Classes/QRView.swift

+ 2
- 2
ios/Classes/QRView.swift Vedi File

@@ -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)
}
}
})


Caricamento…
Annulla
Salva