last_qr_scanner 0.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 70

last_qr_scanner #

This package help you tu create a qr scanner, works on iOS and Android.


0.0.6 #

  • TODO: Describe initial release.


import 'package:flutter/material.dart';

import 'package:flutter/services.dart';
import 'package:last_qr_scanner/last_qr_scanner.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  const MyApp({
    Key key,
  }) : super(key: key);
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
  var qrText = ""; 
  var controller;

  void initState() {

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

  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Barcode Scanner Example'),
        body: Column(
          children: <Widget>[
              child: LastQrScannerPreview(
                key: qrKey,
                onQRViewCreated: _onQRViewCreated,
              flex: 4,
              child: Text("This is the result of scan: $qrText"),
              flex: 1,
              child: RaisedButton(
                onPressed: () {
                child: Text("Toggle Torch"),
              flex: 1,

Use this package as a library

1. Depend on it

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

  last_qr_scanner: ^0.0.6

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:last_qr_scanner/last_qr_scanner.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.9+1
  • Flutter: 1.17.3

Analysis suggestions

Package does not support Flutter platform linux

Because of import path [package:last_qr_scanner/last_qr_scanner.dart]

Package does not support Flutter platform macos

Because of import path [package:last_qr_scanner/last_qr_scanner.dart]

Package does not support Flutter platform web

Because of import path [package:last_qr_scanner/last_qr_scanner.dart]

Package does not support Flutter platform windows

Because of import path [package:last_qr_scanner/last_qr_scanner.dart]

Package not compatible with SDK dart

because of import path [last_qr_scanner]

Health suggestions

Format lib/last_qr_scanner.dart.

Run flutter format to format lib/last_qr_scanner.dart.

Maintenance suggestions

Package is getting outdated. (-23.56 points)

The package was last published 64 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.0
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies