flutter_plugin_qrcode 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 42

[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.0 #

  • 初始化

1.0.1 #

  • 适配ios13.3

1.0.2 #

  • 更新readme

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.2

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]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
42
Learn more about scoring.

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

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.

Maintenance issues and suggestions

The description contains too many non-ASCII characters. (-20 points)

The site uses English as its primary language. The value of the description field in your package's pubspec.yaml field should primarily contain characters used in English.

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.

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.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test