Skip to content

Commit

Permalink
fix iOS multi code
Browse files Browse the repository at this point in the history
  • Loading branch information
Facundo Médica committed Jul 24, 2018
1 parent 8d3e953 commit c4e3ba5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {
await controller.dispose();
}
controller = new QRReaderController(
cameraDescription, ResolutionPreset.high, [CodeFormat.qr], onCodeRead);
cameraDescription, ResolutionPreset.high, [CodeFormat.qr, CodeFormat.pdf417], onCodeRead);

// If the controller is updated then update the UI.
controller.addListener(() {
Expand Down
24 changes: 12 additions & 12 deletions ios/Classes/FastQrReaderViewPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,18 @@ - (instancetype)initWithCameraName:(NSString *)cameraName
// NSLog(@"QR Code: %@", [_captureMetadataOutput availableMetadataObjectTypes]);

NSDictionary<NSString *, AVMetadataObjectType> *availableFormats = [[NSDictionary alloc] initWithObjectsAndKeys:
@"code39", AVMetadataObjectTypeCode39Code,
@"code93", AVMetadataObjectTypeCode93Code,
@"code128", AVMetadataObjectTypeCode128Code,
@"ean8", AVMetadataObjectTypeEAN8Code,
@"ean13", AVMetadataObjectTypeEAN13Code,
@"itf", AVMetadataObjectTypeEAN13Code,
@"upce", AVMetadataObjectTypeUPCECode,
@"aztec", AVMetadataObjectTypeAztecCode,
@"datamatrix", AVMetadataObjectTypeDataMatrixCode,
@"pdf417", AVMetadataObjectTypePDF417Code,
@"qr", AVMetadataObjectTypeQRCode,
nil];
AVMetadataObjectTypeCode39Code,@"code39",
AVMetadataObjectTypeCode93Code,@"code93",
AVMetadataObjectTypeCode128Code, @"code128",
AVMetadataObjectTypeEAN8Code, @"ean8",
AVMetadataObjectTypeEAN13Code,@"ean13",
AVMetadataObjectTypeEAN13Code,@"itf",
AVMetadataObjectTypeUPCECode,@"upce",
AVMetadataObjectTypeAztecCode,@"aztec",
AVMetadataObjectTypeDataMatrixCode,@"datamatrix",
AVMetadataObjectTypePDF417Code, @"pdf417",
AVMetadataObjectTypeQRCode, @"qr",
nil];

NSMutableArray<AVMetadataObjectType> *reqFormats = [[NSMutableArray alloc] init];

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: fast_qr_reader_view
description: A multi-code reader widget with live preview for both iOS and Android. Using native code for detection, scans QR, PDF417 and CODABAR among others.
version: 0.1.0
version: 0.1.1
author: Facundo Medica <facundolmedica@gmail.com>
homepage: https://github.com/facundomedica/fast_qr_reader_view

Expand Down

0 comments on commit c4e3ba5

Please sign in to comment.