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-12-29 10:57:54 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7521a64c1dd241b5658a1f8e93bc5eecc7d7cadf
7521a64c
1 parent
e1ffa1f0
clear barocdes on the web before restarting; forward barcode stream on web
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
lib/src/web/mobile_scanner_web.dart
lib/src/web/mobile_scanner_web.dart
View file @
7521a64
...
...
@@ -41,6 +41,9 @@ class MobileScannerWeb extends MobileScannerPlatform {
}
@override
Stream
<
BarcodeCapture
?>
get
barcodesStream
=>
_barcodesController
.
stream
;
@override
Widget
buildCameraView
()
{
if
(!
_barcodeReader
.
isScanning
)
{
throw
const
MobileScannerException
(
...
...
@@ -80,6 +83,9 @@ class MobileScannerWeb extends MobileScannerPlatform {
}
try
{
// Clear the existing barcodes.
_barcodesController
.
add
(
const
BarcodeCapture
());
await
_barcodeReader
.
start
(
startOptions
,
containerElement:
_divElement
!,
...
...
@@ -145,9 +151,6 @@ class MobileScannerWeb extends MobileScannerPlatform {
_barcodesSubscription
?.
cancel
();
_barcodesSubscription
=
null
;
// Clear the existing barcodes.
_barcodesController
.
add
(
const
BarcodeCapture
());
await
_barcodeReader
.
stop
();
}
...
...
Please
register
or
login
to post a comment