Procházet zdrojové kódy

Fix disposing camera from memory

flutter-beta
Paweł Kuźniak před 6 roky
committed by Dominik Spicher
rodič
revize
243188bd9e
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. +2
    -2
      ios/Classes/QRView.swift

+ 2
- 2
ios/Classes/QRView.swift Zobrazit soubor

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


Načítá se…
Zrušit
Uložit