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
Julian Steenbakker
2022-03-04 18:05:11 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
124586f2de2247742ef95e493f629c74a7a95159
124586f2
1 parent
5c09c76a
bug: fixe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
example/lib/barcode_scanner_controller.dart
ios/Classes/SwiftMobileScannerPlugin.swift
example/lib/barcode_scanner_controller.dart
View file @
124586f
...
...
@@ -16,10 +16,9 @@ class _BarcodeScannerWithControllerState
String
?
barcode
;
MobileScannerController
controller
=
MobileScannerController
(
torchEnabled:
true
,
// formats: [BarcodeFormat.qrCode]
// facing: CameraFacing.front,
);
torchEnabled:
true
,
formats:
[
BarcodeFormat
.
qrCode
]
// facing: CameraFacing.front,
);
bool
isStarted
=
true
;
...
...
ios/Classes/SwiftMobileScannerPlugin.swift
View file @
124586f
...
...
@@ -178,8 +178,10 @@ public class SwiftMobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHan
formatList
.
add
(
BarcodeFormat
(
rawValue
:
index
))
}
let
barcodeOptions
=
BarcodeScannerOptions
(
formats
:
formatList
.
firstObject
as!
BarcodeFormat
)
scanner
=
BarcodeScanner
.
barcodeScanner
(
options
:
barcodeOptions
)
if
(
formatList
.
count
!=
0
)
{
let
barcodeOptions
=
BarcodeScannerOptions
(
formats
:
formatList
.
firstObject
as!
BarcodeFormat
)
scanner
=
BarcodeScanner
.
barcodeScanner
(
options
:
barcodeOptions
)
}
// Set the camera to use
position
=
facing
==
0
?
AVCaptureDevice
.
Position
.
front
:
.
back
...
...
Please
register
or
login
to post a comment