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

Qr Code Scanner Dialog

MyQRScan - QR Code Scanner as a Dialog #

📌 Introduction #

MyQRScan is a Flutter plugin that allows developers to scan QR codes within a dialog UI. It supports Android, iOS, and Web, making it a versatile tool for various applications, especially in Web3-based projects where QR code scanning is frequently required.

✨ Features #

  • Cross-platform support: Works on Android, iOS, and Web.
  • Dialog-based QR scanner: Opens a scanner inside a modal dialog.
  • Easy integration: Simple API for quick implementation.
  • Useful for Web3 applications: Ideal for scanning wallet addresses, transaction data, and authentication QR codes.

🚀 Installation #

Add the dependency in your pubspec.yaml file:

dependencies:
  myqrscan: latest_version

Then, run:

flutter pub get

🔧 Usage #

1️⃣ Initialization #

Before using the scanner, initialize it:

final _myqrscanPlugin = Myqrscan();
String code = "";

2️⃣ Implement QR Code Scanner with a Button Click #

You can use InkWell, ElevatedButton, GestureDetector, or Container to trigger the scanner.

Scaffold(
  appBar: AppBar(
    title: const Text('Plugin Example App'),
  ),
  body: Center(
    child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        InkWell(
          onTap: () {
            _myqrscanPlugin.getScannedQrBarCode(
              context: context,
              onCode: (scannedCode) {
                setState(() {
                  code = scannedCode ?? "";
                });
              },
            );
          },
          child: Text("Click me"),
        ),
        SizedBox(height: 20),
        Text("Result: " + code),
      ],
    ),
  ),
);

📜 License #

This project is licensed under the MIT License.

🙌 Contributing #

Feel free to open issues and contribute improvements via pull requests!


Now you can integrate MyQRScan into your Flutter projects effortlessly! 🚀

1
likes
140
points
221
downloads

Publisher

unverified uploader

Weekly Downloads

Qr Code Scanner Dialog

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, qr_code_scanner_plus, web

More

Packages that depend on myqrscan