Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2024-08-08 11:35:53 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8951c43db11f54facbd72ab8999136152a8f5323
8951c43d
1 parent
926bee47
call close on the barcode scanning client
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScannerHandler.kt
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScanner.kt
View file @
8951c43
...
...
@@ -472,4 +472,11 @@ class MobileScanner(
camera?.cameraControl?.setZoomRatio(1f)
}
/**
* Dispose of this scanner instance.
*/
fun dispose() {
scanner?.close()
scanner = null
}
}
...
...
android/src/main/kotlin/dev/steenbakker/mobile_scanner/MobileScannerHandler.kt
View file @
8951c43
...
...
@@ -92,6 +92,7 @@ class MobileScannerHandler(
fun dispose(activityPluginBinding: ActivityPluginBinding) {
methodChannel?.setMethodCallHandler(null)
methodChannel = null
mobileScanner?.dispose()
mobileScanner = null
val listener: RequestPermissionsResultListener? = permissions.getPermissionListener()
...
...
Please
register
or
login
to post a comment