A modern, fast, and fully featured QR Code Scanner + QR Generator built using Flutter. Includes live camera scanning, gallery image scanning, QR generation, flash control, and more.
- Real-time camera scanning using mobile_scanner
- MLKit-based QR detection from gallery images
- Smooth scanning animation & detection frame
- Duplicate scan prevention (no repeat results)
- Handles multiple barcode types (QR, EAN, UPC, etc.)
- Auto-pause when QR is detected & resume after closing dialog
- Flashlight toggle while scanning
- Camera lifecycle handling (pause/resume on app minimize)
- Pick an image from the gallery
- Extract QR code using Google ML Kit
- Error handling for invalid / unreadable images
- Generate QR codes from text or URLs
- Beautiful, customizable QR display
- Save QR code as PNG
- Share QR image or text
- Clean scanning frame with animated corners
- Selectable scanned text
- Copy-to-clipboard support
- Material 3 design with easy theming
- Snackbars for feedback (errors, success, copy action)
- Camera permission request using
permission_handler - Safe fallback UI if permission is denied
- Flutter (Material 3)
mobile_scannerfor camera scanninggoogle_mlkit_barcode_scanningfor image scanningimage_pickerfor gallery imagesqr_flutterfor QR generationpermission_handlerfor permissions
Clone the repo:
git clone https://github.com/atomhudson/qr_code_generator.git
cd qr_code_generatorInstall dependencies:
flutter pub getRun the app:
flutter runlib/
├── generate_qr/
├── scan_qr/
├── widgets/
├── main.dart
A few official resources to help you if you're new to Flutter: