소스 검색

Nil safe scanning for iOS

flutter-beta
Alexei 6 년 전
committed by Dominik Spicher
부모
커밋
24e8670753
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. +4
    -2
      ios/Classes/QRView.swift

+ 4
- 2
ios/Classes/QRView.swift 파일 보기

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


불러오는 중...
취소
저장