flutter_qr_code_scaner 2.0.0 copy "flutter_qr_code_scaner: ^2.0.0" to clipboard
flutter_qr_code_scaner: ^2.0.0 copied to clipboard

PlatformAndroidiOS
outdated

This package allows user to read or get the data by scan or read QRCode from other object(like wall) or the local image file. This package is available thanks to @hetian9288's work.

example/lib/main.dart

import 'package:examplex/qr_code.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: HomePage());
  }
}

class HomePage extends StatefulWidget {
  HomePage({Key? key}) : super(key: key);

  @override
  _HomePageState createState() => new _HomePageState();
}

class _HomePageState extends State<HomePage> {
  String result = '';

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Package example app'),
      ),
      body: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 16),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            ElevatedButton(
              onPressed: () async {
                String results = await Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => ScanQrcodePage(),
                  ),
                );
                setState(() {
                  result = results;
                });
              },
              child: Text("扫码/tap to scan"),
            ),
            Text(result),
          ],
        ),
      ),
    );
  }
}
8
likes
115
pub points
23%
popularity

Publisher

verified publishertoutao.cloud

This package allows user to read or get the data by scan or read QRCode from other object(like wall) or the local image file. This package is available thanks to @hetian9288's work.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, image_picker, permission_handler

More

Packages that depend on flutter_qr_code_scaner