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),
      ],
    ),
  ),
);

ā˜• Support My Work

I’m passionate about building tools that make development easier! If you find MyQRScan useful, consider supporting me to help me continue creating and maintaining such projects. Your support keeps me motivated! ā¤ļø

Buy Me a Coffee

šŸ“œ 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! šŸš€