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
casvanluijtelaar
2022-06-09 14:37:50 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
467427239f4888c48642f4196a56096ba3e4c813
46742723
1 parent
83df2426
formatting
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
example/lib/barcode_scanner_window.dart
lib/src/mobile_scanner.dart
lib/src/mobile_scanner_controller.dart
example/lib/barcode_scanner_window.dart
View file @
4674272
...
...
@@ -50,7 +50,7 @@ class _BarcodeScannerWithScanWindowState
return
Stack
(
children:
[
MobileScanner
(
fit:
BoxFit
.
co
ntain
,
fit:
BoxFit
.
co
ver
,
scanWindow:
scanWindow
,
controller:
controller
,
onDetect:
(
barcode
,
args
)
{
...
...
lib/src/mobile_scanner.dart
View file @
4674272
...
...
@@ -92,7 +92,7 @@ class _MobileScannerState extends State<MobileScanner>
/// map the texture size to get its new size after fitted to screen
final
fittedSizes
=
applyBoxFit
(
fit
,
textureSize
,
widgetSize
);
final
fittedTextureSize
=
fittedSizes
.
destination
;
/// create a new rectangle that represents the texture on the screen
final
minX
=
widgetSize
.
width
/
2
-
fittedTextureSize
.
width
/
2
;
final
minY
=
widgetSize
.
height
/
2
-
fittedTextureSize
.
height
/
2
;
...
...
lib/src/mobile_scanner_controller.dart
View file @
4674272
...
...
@@ -156,7 +156,7 @@ class MobileScannerController {
// Set the starting arguments for the camera
final
Map
arguments
=
{};
arguments
[
'facing'
]
=
facing
.
index
;
/* if (scanWindow != null) {
/* if (scanWindow != null) {
arguments['scanWindow'] = [
scanWindow!.left,
scanWindow!.top,
...
...
Please
register
or
login
to post a comment