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 16:01:11 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5eb93f862d05132008fc015d94ff77f286207d42
5eb93f86
1 parent
2f913f9f
forward raw format value to Android; set cameraResolution argument regardless of platform
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
lib/src/mobile_scanner_controller.dart
lib/src/mobile_scanner_controller.dart
View file @
5eb93f8
...
...
@@ -136,6 +136,7 @@ class MobileScannerController {
arguments
[
'torch'
]
=
torchEnabled
;
arguments
[
'speed'
]
=
detectionSpeed
.
rawValue
;
arguments
[
'timeout'
]
=
detectionTimeoutMs
;
arguments
[
'returnImage'
]
=
returnImage
;
/* if (scanWindow != null) {
arguments['scanWindow'] = [
...
...
@@ -147,19 +148,18 @@ class MobileScannerController {
} */
if
(
formats
!=
null
)
{
if
(
kIsWeb
||
Platform
.
isIOS
||
Platform
.
isMacOS
)
{
if
(
kIsWeb
||
Platform
.
isIOS
||
Platform
.
isMacOS
||
Platform
.
isAndroid
)
{
arguments
[
'formats'
]
=
formats
!.
map
((
e
)
=>
e
.
rawValue
).
toList
();
}
else
if
(
Platform
.
isAndroid
)
{
arguments
[
'formats'
]
=
formats
!.
map
((
e
)
=>
e
.
index
).
toList
();
if
(
cameraResolution
!=
null
)
{
arguments
[
'cameraResolution'
]
=
<
int
>[
cameraResolution
!.
width
.
toInt
(),
cameraResolution
!.
height
.
toInt
(),
];
}
}
}
arguments
[
'returnImage'
]
=
returnImage
;
if
(
cameraResolution
!=
null
)
{
arguments
[
'cameraResolution'
]
=
<
int
>[
cameraResolution
!.
width
.
toInt
(),
cameraResolution
!.
height
.
toInt
(),
];
}
return
arguments
;
}
...
...
Please
register
or
login
to post a comment