flutter_qr_scanner 0.0.1 copy "flutter_qr_scanner: ^0.0.1" to clipboard
flutter_qr_scanner: ^0.0.1 copied to clipboard

outdated

A Plugin for reading/scanning QR & Bar codes using Google's Mobile Vision API.

Flutter QR Reader #

pub package

Reads QR code and Barcode using Google's Mobile Vision API._

Usage #

import 'package:flutter_qr_scanner/qr_camera.dart';

...

new SizedBox(
  width: 500.0,
  height: 610.0,
  child: new QrCamera(
    qrCodeCallback: (code) {
      ...
    },
  ),
)

The QrCodeCallback can do anything you'd like, and wil keep receiving QR codes until the camera is stopped.

There are also optional parameters to QrCamera.

fit #

Takes as parameter the flutter BoxFit. Setting this to different values should get the preview image to fit in different ways, but only BoxFit = cover has been tested extensively.

notStartedBuilder #

A callback that must return a widget if defined. This should build whatever you want to show up while the camera is loading (which can take from milliseconds to seconds depending on the device).

child #

Widget that is shown on top of the QrCamera. If you give it a specific size it may cause weird issues so try not to.

key #

Standard flutter key argument. Can be used to get QrCameraState with a GlobalKey.

offscreenBuilder #

A callback that must return a widget if defined. This should build whatever you want to show up when the camera view is 'offscreen'. i.e. when the app is paused. May or may not show up in preview of app.

onError #

Callback for if there's an error.

'formats' #

A list of supported formats, all by default. If you use all, you shouldn't define any others.

These are the supported types:

  ALL_FORMATS,
  AZTEC,
  CODE_128,
  CODE_39,
  CODE_93,
  CODABAR,
  DATA_MATRIX,
  EAN_13,
  EAN_8,
  ITF,
  PDF417,
  QR_CODE,
  UPC_A,
  UPC_E

Push and Pop #

If you push a new widget on top of a the current page using the navigator, the camera doesn't necessarily know about it.

Contributions #

Anyone wanting to contribute to this project is very welcome to! I'll take a look at PR's as soon as I can, and any bug reports are appreciated. I've only a few devices on which to test this so feedback about other devices is appreciated as well.

This has been tested on:

  • Nexus 5x
  • Nexus 4
  • Alcatel Idol X Plus
  • Essential Phone
  • iPhone 6
8
likes
0
points
18
downloads

Publisher

verified publishernoortechs.com

Weekly Downloads

A Plugin for reading/scanning QR & Bar codes using Google's Mobile Vision API.

Homepage

License

unknown (license)

Dependencies

flutter, native_device_orientation

More

Packages that depend on flutter_qr_scanner