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-23 15:30:37 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
478f9d8b964956f5ca66c28968ecc29bd80c6b44
478f9d8b
1 parent
913273ff
use rawValue instead of index for enums
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
lib/mobile_scanner_web_plugin.dart
lib/src/mobile_scanner_controller.dart
lib/mobile_scanner_web_plugin.dart
View file @
478f9d8
...
...
@@ -139,7 +139,7 @@ class MobileScannerWebPlugin {
'rawBytes'
:
code
.
rawBytes
,
'format'
:
code
.
format
.
rawValue
,
'displayValue'
:
code
.
displayValue
,
'type'
:
code
.
type
.
index
,
'type'
:
code
.
type
.
rawValue
,
if
(
corners
!=
null
&&
corners
.
isNotEmpty
)
'corners'
:
corners
.
map
(
...
...
lib/src/mobile_scanner_controller.dart
View file @
478f9d8
...
...
@@ -132,9 +132,9 @@ class MobileScannerController {
final
Map
<
String
,
dynamic
>
arguments
=
{};
cameraFacingState
.
value
=
cameraFacingOverride
??
facing
;
arguments
[
'facing'
]
=
cameraFacingState
.
value
.
index
;
arguments
[
'facing'
]
=
cameraFacingState
.
value
.
rawValue
;
arguments
[
'torch'
]
=
torchEnabled
;
arguments
[
'speed'
]
=
detectionSpeed
.
index
;
arguments
[
'speed'
]
=
detectionSpeed
.
rawValue
;
arguments
[
'timeout'
]
=
detectionTimeoutMs
;
/* if (scanWindow != null) {
...
...
@@ -329,7 +329,7 @@ class MobileScannerController {
torchState
.
value
=
torchState
.
value
==
TorchState
.
off
?
TorchState
.
on
:
TorchState
.
off
;
await
_methodChannel
.
invokeMethod
(
'torch'
,
torchState
.
value
.
index
);
await
_methodChannel
.
invokeMethod
(
'torch'
,
torchState
.
value
.
rawValue
);
}
/// Changes the state of the camera (front or back).
...
...
Please
register
or
login
to post a comment