Parcourir la source

Fix disposing camera from memory

flutter-beta
Paweł Kuźniak il y a 6 ans
committed by Dominik Spicher
Parent
révision
243188bd9e
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. +2
    -2
      ios/Classes/QRView.swift

+ 2
- 2
ios/Classes/QRView.swift Voir le fichier

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


Chargement…
Annuler
Enregistrer