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-10 14:41:23 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f2902bf9829d9f6a51efed6b885e2ba69ab388e0
f2902bf9
1 parent
f3329659
fix url for macos
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
macos/mobile_scanner/Sources/mobile_scanner/MobileScannerPlugin.swift
macos/mobile_scanner/Sources/mobile_scanner/MobileScannerPlugin.swift
View file @
f2902bf
...
...
@@ -458,7 +458,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler,
let
argReader
=
MapArgumentReader
(
call
.
arguments
as?
[
String
:
Any
])
let
symbologies
:[
VNBarcodeSymbology
]
=
argReader
.
toSymbology
()
guard
let
file
Url
:
URL
=
URL
(
string
:
argReader
.
string
(
key
:
"filePath"
)
??
"
"
)
else
{
guard
let
file
Path
:
String
=
argReader
.
string
(
key
:
"filePath
"
)
else
{
// TODO: fix error code
result
(
FlutterError
(
code
:
"MobileScanner"
,
message
:
"No image found in analyzeImage!"
,
...
...
@@ -466,6 +466,8 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler,
return
}
let
fileUrl
=
URL
(
fileURLWithPath
:
filePath
)
guard
let
ciImage
=
CIImage
(
contentsOf
:
fileUrl
)
else
{
// TODO: fix error code
result
(
FlutterError
(
code
:
"MobileScanner"
,
...
...
Please
register
or
login
to post a comment