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 12:22:31 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
476ba2ec11ff1e9fb0335cebb678f066d95ab9dc
476ba2ec
1 parent
f8e4f9d6
clean up a check in the web plugin
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
lib/mobile_scanner_web_plugin.dart
lib/mobile_scanner_web_plugin.dart
View file @
476ba2e
...
...
@@ -149,9 +149,10 @@ class MobileScannerWebPlugin {
});
final
hasTorch
=
await
barCodeReader
.
hasTorch
();
final
bool
?
enableTorch
=
arguments
[
'torch'
]
as
bool
?;
if
(
hasTorch
&&
arguments
.
containsKey
(
'torch'
))
{
await
barCodeReader
.
toggleTorch
(
enabled:
arguments
[
'torch'
]
as
bool
);
if
(
hasTorch
&&
enableTorch
!=
null
)
{
await
barCodeReader
.
toggleTorch
(
enabled:
enableTorch
);
}
return
{
...
...
Please
register
or
login
to post a comment