Skip to content

A QR code scanner that works on both iOS and Android using dart decoder.

License

Notifications You must be signed in to change notification settings

bahag-raesenerm/qr_code_dart_scan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pub package

QRCodeDartScan

A QR code scanner that works on both iOS and Android using dart decoder.

Scanning normal Qr code Scanning invert Qr code

APK DEMO

Features

  • Camera scan preview in a widget
  • Scan QRCode
  • Scan invert QRCode

Supported Formats

  • QR_CODE
  • AZTEC
  • DATA_MATRIX
  • PDF_417
  • CODE_39
  • CODE_93
  • CODE_128
  • EAN_8
  • EAN_13

Installation

First, add qr_code_dart_scan as a dependency in your pubspec.yaml file.

iOS

iOS 10.0 of higher is needed to use the camera plugin. If compiling for any version lower than 10.0 make sure to check the iOS version before using the camera plugin. For example, using the device_info plugin.

Add two rows to the ios/Runner/Info.plist:

  • one with the key Privacy - Camera Usage Description and a usage description.
  • and one with the key Privacy - Microphone Usage Description and a usage description.

Or in text format add the key:

<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
<key>NSMicrophoneUsageDescription</key>
<string>Can I use the mic please?</string>

Android

Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21

It's important to note that the MediaRecorder class is not working properly on emulators, as stated in the documentation: https://developer.android.com/reference/android/media/MediaRecorder. Specifically, when recording a video with sound enabled and trying to play it back, the duration won't be correct and you will only see the first frame.

Using

    return Scaffold(
      body: QRCodeDartScanView(
        scanInvertedQRCode: true, // enable scan invert qr code ( default = false)
        onCapture: (Result result) {
          // do anything with result
          // result.text
          // result.rawBytes
          // result.resultPoints
          // result.format
          // result.numBits
          // result.resultMetadata
          // result.time
        },
      ),
    );
    

About

A QR code scanner that works on both iOS and Android using dart decoder.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 90.6%
  • Ruby 6.6%
  • Swift 2.0%
  • Other 0.8%