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-09-04 09:50:16 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fa763a2f4358815dddbc13975ca5b55d506aa5a7
fa763a2f
1 parent
0856a59e
update the image parsing from the method channel
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
lib/src/method_channel/mobile_scanner_method_channel.dart
lib/src/method_channel/mobile_scanner_method_channel.dart
View file @
fa763a2
...
...
@@ -72,13 +72,16 @@ class MethodChannelMobileScanner extends MobileScannerPlatform {
if
(
defaultTargetPlatform
==
TargetPlatform
.
android
||
defaultTargetPlatform
==
TargetPlatform
.
iOS
)
{
final
double
?
width
=
event
[
'width'
]
as
double
?;
final
double
?
height
=
event
[
'height'
]
as
double
?;
final
Map
<
String
,
Object
?>?
imageData
=
event
[
'image'
]
as
Map
<
String
,
Object
?>?;
final
Uint8List
?
image
=
imageData
?[
'bytes'
]
as
Uint8List
?;
final
double
?
width
=
imageData
?[
'width'
]
as
double
?;
final
double
?
height
=
imageData
?[
'height'
]
as
double
?;
return
BarcodeCapture
(
raw:
data
,
barcodes:
barcodes
.
map
(
Barcode
.
fromNative
).
toList
(),
image:
event
[
'image'
]
as
Uint8List
?
,
image:
image
,
size:
width
==
null
||
height
==
null
?
Size
.
zero
:
Size
(
width
,
height
),
);
}
...
...
Please
register
or
login
to post a comment