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-09 14:39:08 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1d27f7ede373db127ef75c16e13c698473467ef4
1d27f7ed
1 parent
54c609f1
removve redundant double conversions
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
macos/mobile_scanner/Sources/mobile_scanner/MobileScannerPlugin.swift
macos/mobile_scanner/Sources/mobile_scanner/MobileScannerPlugin.swift
View file @
1d27f7e
...
...
@@ -549,16 +549,16 @@ extension VNBarcodeObservation {
public
func
toMap
()
->
[
String
:
Any
?]
{
return
[
"corners"
:
[
[
"x"
:
Double
(
topLeft
.
x
),
"y"
:
Double
(
topLeft
.
y
)],
[
"x"
:
Double
(
topRight
.
x
),
"y"
:
Double
(
topRight
.
y
)],
[
"x"
:
Double
(
bottomRight
.
x
),
"y"
:
Double
(
bottomRight
.
y
)],
[
"x"
:
Double
(
bottomLeft
.
x
),
"y"
:
Double
(
bottomLeft
.
y
)],
[
"x"
:
topLeft
.
x
,
"y"
:
topLeft
.
y
],
[
"x"
:
topRight
.
x
,
"y"
:
topRight
.
y
],
[
"x"
:
bottomRight
.
x
,
"y"
:
bottomRight
.
y
],
[
"x"
:
bottomLeft
.
x
,
"y"
:
bottomLeft
.
y
],
],
"format"
:
symbology
.
toInt
??
-
1
,
"rawValue"
:
payloadStringValue
??
""
,
"size"
:
[
"width"
:
Double
(
distanceBetween
(
topLeft
,
topRight
)),
"height"
:
Double
(
distanceBetween
(
topLeft
,
bottomLeft
)),
"width"
:
distanceBetween
(
topLeft
,
topRight
),
"height"
:
distanceBetween
(
topLeft
,
bottomLeft
),
],
]
}
...
...
Please
register
or
login
to post a comment