Procházet zdrojové kódy

Nil safe scanning for iOS

flutter-beta
Alexei před 6 roky
committed by Dominik Spicher
rodič
revize
24e8670753
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. +4
    -2
      ios/Classes/QRView.swift

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

@@ -26,8 +26,10 @@ public class QRView:NSObject,FlutterPlatformView {
try scanner?.startScanning(resultBlock: { codes in
if let codes = codes {
for code in codes {
let stringValue = code.stringValue!
self.channel.invokeMethod("onRecognizeQR", arguments: stringValue)
if (code != nil && code.stringValue != nil) {
let stringValue = code.stringValue!
self.channel.invokeMethod("onRecognizeQR", arguments: stringValue)
}
}
}
})


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