flutter_qrscaner 1.0.0 copy "flutter_qrscaner: ^1.0.0" to clipboard
flutter_qrscaner: ^1.0.0 copied to clipboard

A QR scan plugin based on zxing for android,it is very simple to use,only need one line code.This plugin is not work for ios,because i have no idea on object c or swift.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_qrscaner/flutter_qrscaner.dart';

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

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

class _MyAppState extends State<MyApp> {
  String _qrContent = "";

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Spacer(),
              RaisedButton(
                  onPressed: () {
                    FlutterQrscaner.startScan().then((value) {
                      setState(() {
                        _qrContent = value;
                      });
                    });
                  },
                  child: Text('开始扫码')),
              Spacer(),
              Text('扫码结果:$_qrContent'),
              Spacer()
            ],
          ),
        ),
      ),
    );
  }
}
4
likes
25
pub points
29%
popularity

Publisher

unverified uploader

A QR scan plugin based on zxing for android,it is very simple to use,only need one line code.This plugin is not work for ios,because i have no idea on object c or swift.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_qrscaner