barcode_scan 0.0.8

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 90

Barcode Scanner

A flutter plugin for scanning 2D barcodes and QR codes.

This provides a simple wrapper for two commonly used iOS and Android libraries:

iOS: https://github.com/mikebuss/MTBBarcodeScanner

Android: https://github.com/dm77/barcodescanner

Features

  • [x] Scan 2D barcodes
  • [x] Scan QR codes
  • [x] Control the flash while scanning
  • [x] Permission handling
  • [ ] Support multiple barcode libraries

Getting Started

Android

For Android, you must do the following before you can use the plugin:

  • Add the camera permission to your AndroidManifest.xml

    <uses-permission android:name="android.permission.CAMERA" />

  • Add the BarcodeScanner activity to your AndroidManifest.xml. Do NOT modify the name.

    <activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"/>

Edit your project-level build.gradle file to look like this:

buildscript {
    ext.kotlin_version = '1.2.31'
    ...
    dependencies {
        ...
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
...

Edit your app-level build.gradle file to look like this:

apply plugin: 'kotlin-android'
...
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    ...
}

Now you can depend on the barcode_scan plugin in your pubspec.yaml file:

dependencies:
  ...
  barcode_scan: ^0.0.3

Click "Packages get" in Android Studio or run flutter packages get in your project folder.

iOS

To use on iOS, you must add the the camera usage description to your Info.plist

<key>NSCameraUsageDescription</key>
<string>Camera permission is required for barcode scanning.</string>

[0.0.8] - 8/30/18

[0.0.7] - 8/30/18

  • Fix iOS barcodes not scanning

[0.0.6] - 8/29/18

  • Fix android dependencies
  • iOS scanner now looks like Android thanks to @dustin-graham

[0.0.4] - 2/8/18

  • Fix missing gradle dependency (thanks to toteto)
  • Update gradle dependencies

[0.0.3] - 2/8/17

  • Improved permission handling (thanks to BenSower)
  • Added MIT license

[0.0.2] - 11/7/17

[0.0.1] - 10/29/17

  • Supports 2D & QR Codes
  • Control flash while scanning

example/README.md

barcode_scan_example

Demonstrates how to use the barcode_scan plugin.

Getting Started

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  barcode_scan: ^0.0.8

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:barcode_scan/barcode_scan.dart';
  
Version Uploaded Documentation Archive
0.0.8 Nov 19, 2018 Go to the documentation of barcode_scan 0.0.8 Download barcode_scan 0.0.8 archive
0.0.7 Aug 30, 2018 Go to the documentation of barcode_scan 0.0.7 Download barcode_scan 0.0.7 archive
0.0.6 Aug 30, 2018 Go to the documentation of barcode_scan 0.0.6 Download barcode_scan 0.0.6 archive
0.0.5 Aug 21, 2018 Go to the documentation of barcode_scan 0.0.5 Download barcode_scan 0.0.5 archive
0.0.4 Apr 17, 2018 Go to the documentation of barcode_scan 0.0.4 Download barcode_scan 0.0.4 archive
0.0.3 Feb 8, 2018 Go to the documentation of barcode_scan 0.0.3 Download barcode_scan 0.0.3 archive
0.0.2 Nov 8, 2017 Go to the documentation of barcode_scan 0.0.2 Download barcode_scan 0.0.2 archive
0.0.1 Oct 30, 2017 Go to the documentation of barcode_scan 0.0.1 Download barcode_scan 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
98
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
90
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs (-10 points)

4 out of 4 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.58.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8