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
2023-10-31 13:05:56 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bb37246aa03214256dee9c47266a6abd0137c409
bb37246a
1 parent
75c86de0
set the torch state to 'off' after stopping the camera
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
lib/src/mobile_scanner_controller.dart
lib/src/mobile_scanner_controller.dart
View file @
bb37246
...
...
@@ -311,11 +311,11 @@ class MobileScannerController {
/// Stops the camera, but does not dispose this controller.
Future
<
void
>
stop
()
async
{
try
{
await
_methodChannel
.
invokeMethod
(
'stop'
);
}
catch
(
e
)
{
debugPrint
(
'
$e
'
);
}
await
_methodChannel
.
invokeMethod
(
'stop'
);
// After the camera stopped, set the torch state to off,
// as the torch state callback is never called when the camera is stopped.
torchState
.
value
=
TorchState
.
off
;
}
/// Switches the torch on or off.
...
...
Please
register
or
login
to post a comment