cs_flutter_plugin_qrcode 0.0.3 copy "cs_flutter_plugin_qrcode: ^0.0.3" to clipboard
cs_flutter_plugin_qrcode: ^0.0.3 copied to clipboard

the flutter qr code scanning plugin supports android and ios

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:flutter_plugin_qrcode/flutter_plugin_qrcode.dart';

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

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

class _MyAppState extends State<MyApp> {
  String _qrcode = '二维码扫描';

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


  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;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter QRCode Plugin example app'),
        ),
        body: Center(

          child: FlatButton(onPressed: (){
            getQrcodeState();

          },
              child: Text('$_qrcode')),
        ),
      ),
    );
  }
}
0
likes
15
points
20
downloads

Publisher

verified publisher1v5.me

Weekly Downloads

the flutter qr code scanning plugin supports android and ios

License

unknown (license)

Dependencies

flutter

More

Packages that depend on cs_flutter_plugin_qrcode

Packages that implement cs_flutter_plugin_qrcode