flutter_plugin_qrcode 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 75

[TOC]

flutter_plugin_qrcode #

二维码扫描 同时支持 Android&IOS

Getting Started #

扫描效果

android

IOS

引入方式 #

  dependencies:
    flutter_plugin_qrcode: ^1.0.1

 

##导入头文件

        import 'package:flutter_plugin_qrcode/flutter_plugin_qrcode.dart';
 

使用 #

  Future<void> getQrcodeState() async {
    String qrcode;
    try {
      qrcode = await FlutterPluginQrcode.getQRCode;
    } on PlatformException {
      qrcode = 'Failed to get platform version.';
    }

    if (!mounted) return;
    //获取到扫描的结果进行页面更新
    setState(() {
      _qrcode = qrcode;
    });
  }

关注公众号获取更多内容 #

1.0.3 #

  • 格式化代码

1.0.2 #

  • 更新readme

1.0.1 #

  • 适配ios13.3

1.0.0 #

  • 初始化

example/README.md

引入方式 #

  dependencies:
    flutter_plugin_qrcode: ^1.0.1

 

导入头文件 #

        import 'package:flutter_plugin_qrcode/flutter_plugin_qrcode.dart';
 

使用 #

  Future<void> getQrcodeState() async {
    String qrcode;
    try {
      qrcode = await FlutterPluginQrcode.getQRCode;
    } on PlatformException {
      qrcode = 'Failed to get platform version.';
    }

    if (!mounted) return;
    //获取到扫描的结果进行页面更新
    setState(() {
      _qrcode = qrcode;
    });
  }

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_plugin_qrcode: ^1.0.3

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:flutter_plugin_qrcode/flutter_plugin_qrcode.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
50
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
75
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health issues and suggestions

Document public APIs. (-1 points)

4 out of 4 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

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