fzxing 0.1.0+2

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

fzxing

A Zxing flutter plugin project to wrap zxing-android-embedded for Android and LBXScan for iOS

Parameters' default value

    bool isBeep = true,
    bool isContinuous = false,
    int continuousInterval = 1000, // only works when isContinuous is true

Destructive change

scan will return a List<String> instead of String

[0.1.0]

  • remove EventBus dependency from Android
  • Add continuousInterval for both Android and iOS, which works only when isContinuous = true
  • scan method will return List<String> instead of String

[0.0.5+1]

  • Update CHANGELOG, LICENSE and README
  • Change version in podfile

[0.0.5]

  • Fix compiling issue

[0.0.4]

  • Implement isBeep and isContinuous for iOS

[0.0.3]

  • Add iOS code scan support

[0.0.2]

  • Add Android support

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => new _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _barcode = 'Unknown';

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        ),
        body: new Center(
          child: new Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              new Text('barcode: $_barcode\n'),
              new RaisedButton(
                onPressed: () {
                  try {
                    Fzxing
                        .scan(
                            isBeep: true,
                            isContinuous: false,
                            continuousInterval: 2000)
                        .then((barcodeResult) {
                      print("new bar code :" + barcodeResult.toString());
                      setState(() {
                        _barcode = barcodeResult.join(',');
                      });
                    });
                  } on PlatformException {
                    _barcode = 'Failed to get barcode.';
                  }
                },
                child: Text('scan'),
              )
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  fzxing: ^0.1.0+2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or 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:fzxing/fzxing.dart';
  
Version Uploaded Documentation Archive
0.1.0+2 Jun 1, 2018 Go to the documentation of fzxing 0.1.0+2 Download fzxing 0.1.0+2 archive
0.1.0+1 Jun 1, 2018 Go to the documentation of fzxing 0.1.0+1 Download fzxing 0.1.0+1 archive
0.1.0 May 14, 2018 Go to the documentation of fzxing 0.1.0 Download fzxing 0.1.0 archive
0.0.5+1 May 12, 2018 Go to the documentation of fzxing 0.0.5+1 Download fzxing 0.0.5+1 archive
0.0.5 May 12, 2018 Go to the documentation of fzxing 0.0.5 Download fzxing 0.0.5 archive
0.0.4 May 12, 2018 Go to the documentation of fzxing 0.0.4 Download fzxing 0.0.4 archive
0.0.3 May 4, 2018 Go to the documentation of fzxing 0.0.3 Download fzxing 0.0.3 archive
0.0.2 May 4, 2018 Go to the documentation of fzxing 0.0.2 Download fzxing 0.0.2 archive
0.0.1 May 3, 2018 Go to the documentation of fzxing 0.0.1 Download fzxing 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
9
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
4
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <2.0.0