qr_code_scanner 0.0.5

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

qr_code_scanner #

This package wires the PlatformView corresponding to iOS and Android inside flutter.

#Credits

#TODO'S:

  • Add support to flip camera view.
  • iOS Native embedding is written to match what is supported in the framework as of the date of publication of this package. It needs to be improved as the framework support improves.
  • Finally, I welcome PR's to make it better :), thanks

0.0.5 #

  • preview stretching after change screen orientation fix

0.0.4 #

  • fix black screen orientation/unlock/focus

0.0.3 #

  • iOS library reference fix
  • Android pause/resume fix

0.0.2 #

  • Added documentation to cover how to use the plugin.

0.0.1 #

  • QR Code scanner embedded inside flutter.

example/README.md

qr_code_scanner #

Demonstrates how to use the qr_code_scanner plugin. ##iOS Support:

###info.plist

<dict>
    <key>io.flutter.embedded_views_preview</key>
	<true/>
	<key>UIBackgroundModes</key>
	<array>
		<string>fetch</string>
		<string>remote-notification</string>
	</array>
	<key>NSCameraUsageDescription</key>
    <string>Can we access your camera in order to scan barcodes?</string>
</dict>

##Example:

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:qr_code_scanner/qr_code_scanner.dart';

void main() => runApp(MaterialApp(home: QRViewExample()));

class QRViewExample extends StatefulWidget {
  const QRViewExample({
    Key key,
  }) : super(key: key);

  @override
  State<StatefulWidget> createState() => _QRViewExampleState();
}

class _QRViewExampleState extends State<QRViewExample> {
  final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
  var qrText = "";
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: <Widget>[
          Expanded(
            child: QRView(
              key: qrKey,
              onQRViewCreated: _onQRViewCreated,
            ),
            flex: 4,
          ),
          Expanded(
            child: Text("This is the result of scan: $qrText"),
            flex: 1,
          )
        ],
      ),
    );
  }

  void _onQRViewCreated(QRViewController controller) {
    final channel = controller.channel;
    controller.init(qrKey);
    channel.setMethodCallHandler((MethodCall call) async {
      switch (call.method) {
        case "onRecognizeQR":
          dynamic arguments = call.arguments;
          setState(() {
            qrText = arguments.toString();
          });
      }
    });
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  qr_code_scanner: ^0.0.5

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:qr_code_scanner/qr_code_scanner.dart';
  
Version Uploaded Documentation Archive
0.0.5 Apr 5, 2019 Go to the documentation of qr_code_scanner 0.0.5 Download qr_code_scanner 0.0.5 archive
0.0.4 Apr 2, 2019 Go to the documentation of qr_code_scanner 0.0.4 Download qr_code_scanner 0.0.4 archive
0.0.3 Mar 29, 2019 Go to the documentation of qr_code_scanner 0.0.3 Download qr_code_scanner 0.0.3 archive
0.0.2 Dec 23, 2018 Go to the documentation of qr_code_scanner 0.0.2 Download qr_code_scanner 0.0.2 archive
0.0.1 Dec 23, 2018 Go to the documentation of qr_code_scanner 0.0.1 Download qr_code_scanner 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
83
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
89
Learn more about scoring.

We analyzed this package on Apr 23, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

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

While nothing is inherently wrong with versions of 0.0.*, it might mean 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.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8