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-18 11:21:27 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
53a4134fc33be7ce063a1b8a2cd93e9050dbc2d7
53a4134f
1 parent
47a0779a
fix MacOS leftover error codes
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
macos/mobile_scanner/Sources/mobile_scanner/MobileScannerPlugin.swift
macos/mobile_scanner/Sources/mobile_scanner/MobileScannerPlugin.swift
View file @
53a4134
...
...
@@ -484,8 +484,9 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler,
if
error
!=
nil
{
DispatchQueue
.
main
.
async
{
// TODO: fix error code
result
(
FlutterError
(
code
:
"MobileScanner"
,
message
:
error
?
.
localizedDescription
,
details
:
nil
))
result
(
FlutterError
(
code
:
MobileScannerErrorCodes
.
BARCODE_ERROR
,
message
:
error
?
.
localizedDescription
,
details
:
nil
))
}
return
}
...
...
@@ -510,10 +511,11 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler,
}
try
imageRequestHandler
.
perform
([
barcodeRequest
])
}
catch
let
e
{
// TODO: fix error code
}
catch
let
error
{
DispatchQueue
.
main
.
async
{
result
(
FlutterError
(
code
:
"MobileScanner"
,
message
:
e
.
localizedDescription
,
details
:
nil
))
result
(
FlutterError
(
code
:
MobileScannerErrorCodes
.
BARCODE_ERROR
,
message
:
error
.
localizedDescription
,
details
:
nil
))
}
}
}
...
...
Please
register
or
login
to post a comment