fzxing 0.3.0 copy "fzxing: ^0.3.0" to clipboard
fzxing: ^0.3.0 copied to clipboard

discontinued

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

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> {
  List<String> _barcode;

  @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: true)
                        .then((barcodeResult) {
                      print("flutter size:" + barcodeResult?.toString());
                      setState(() {
                        _barcode = barcodeResult;
                      });
                    });
                  } on PlatformException {
                    _barcode.add('Failed to get barcode.');
                  }
                },
                child: Text('scan'),
              )
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
40
pub points
0%
popularity

Publisher

verified publishermings.in

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

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on fzxing