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
Jochum van der Ploeg
2022-09-26 18:03:22 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a5639060a387f9bcaa0710b0acd0e4abff36ef97
a5639060
1 parent
0616500f
fix: should check for the raw bytes instead of string, in case of a malformed utf8 string
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
lib/src/mobile_scanner.dart
lib/src/mobile_scanner.dart
View file @
a563906
...
...
@@ -66,7 +66,7 @@ class _MobileScannerState extends State<MobileScanner>
}
}
String
?
lastScanned
;
Uint8List
?
lastScanned
;
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -79,8 +79,8 @@ class _MobileScannerState extends State<MobileScanner>
}
else
{
controller
.
barcodes
.
listen
((
barcode
)
{
if
(!
widget
.
allowDuplicates
)
{
if
(
lastScanned
!=
barcode
.
rawValue
)
{
lastScanned
=
barcode
.
rawValue
;
if
(
lastScanned
!=
barcode
.
rawBytes
)
{
lastScanned
=
barcode
.
rawBytes
;
widget
.
onDetect
(
barcode
,
value
!
as
MobileScannerArguments
);
}
}
else
{
...
...
Please
register
or
login
to post a comment