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
p-mazhnik
2022-12-12 03:00:30 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
804457e89e880c9724bd3e6f8616ceae28722f02
804457e8
1 parent
869c22ae
feat(web): pass format info to controller
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
lib/mobile_scanner_web_plugin.dart
lib/src/mobile_scanner_controller.dart
lib/mobile_scanner_web_plugin.dart
View file @
804457e
...
...
@@ -6,6 +6,7 @@ import 'package:flutter/services.dart';
import
'package:flutter_web_plugins/flutter_web_plugins.dart'
;
import
'package:mobile_scanner/mobile_scanner_web.dart'
;
import
'package:mobile_scanner/src/enums/camera_facing.dart'
;
import
'package:mobile_scanner/src/objects/barcode.dart'
;
/// This plugin is the web implementation of mobile_scanner.
/// It only supports QR codes.
...
...
@@ -102,6 +103,7 @@ class MobileScannerWebPlugin {
'data'
:
{
'rawValue'
:
code
.
rawValue
,
'rawBytes'
:
code
.
rawBytes
,
'format'
:
code
.
format
.
rawValue
,
},
});
}
...
...
lib/src/mobile_scanner_controller.dart
View file @
804457e
...
...
@@ -333,10 +333,12 @@ class MobileScannerController {
_barcodesController
.
add
(
BarcodeCapture
(
barcodes:
[
if
(
barcode
!=
null
)
Barcode
(
rawValue:
barcode
?[
'rawValue'
]
as
String
?,
rawBytes:
barcode
?[
'rawBytes'
]
as
Uint8List
?,
)
rawValue:
barcode
[
'rawValue'
]
as
String
?,
rawBytes:
barcode
[
'rawBytes'
]
as
Uint8List
?,
format:
toFormat
(
barcode
[
'format'
]
as
int
),
),
],
),
);
...
...
Please
register
or
login
to post a comment