Browse Source

release camera when widget dispose

flutter-beta
Leon 7 years ago
committed by GitHub
parent
commit
73817d0087
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt

+ 2
- 1
android/src/main/kotlin/net/touchcapture/qr/flutterqr/QRView.kt View File

@@ -88,6 +88,7 @@ class QRView(context: Context, private val registrar: PluginRegistry.Registrar,
}

override fun dispose() {
barcodeView.pause()
}

private inner class CameraRequestPermissionsListener : PluginRegistry.RequestPermissionsResultListener {
@@ -143,4 +144,4 @@ class QRView(context: Context, private val registrar: PluginRegistry.Registrar,
}
}

}
}

Loading…
Cancel
Save