ebs_qrcode 0.1.0
ebs_qrcode: ^0.1.0 copied to clipboard
A customizable, cross-platform QR / barcode scanner widget for Flutter with a modern viewfinder, torch, camera flip, and scan-from-gallery.
ebs_qrcode #
A customizable, cross-platform QR / barcode scanner widget for Flutter with a modern viewfinder, an attractive torch (flash) button, camera flip, an animated scan line, and scan-from-gallery.
Built on mobile_scanner with
image_picker for gallery scanning.
Platforms #
| Android | iOS | macOS | Web |
|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ |
(Camera + gallery availability follows the underlying mobile_scanner /
image_picker support for each platform.)
Install #
dependencies:
ebs_qrcode:
path: ../ebs_qrcode # or a git/pub reference
Permissions #
- iOS
Info.plist:NSCameraUsageDescription(andNSPhotoLibraryUsageDescriptionfor gallery scanning). - Android: the plugins declare the
CAMERApermission via manifest merge;minSdkVersion 21+.
Usage #
Push the scanner and await the decoded value:
final code = await EbsQrScanner.scan(context);
if (code != null) {
// use the scanned value
}
Customize it:
final code = await EbsQrScanner.scan(
context,
config: EbsQrConfig(
title: 'Scan to sign in',
accentColor: Color(0xFF3BBCE5),
showFlip: false,
formats: [BarcodeFormat.qrCode],
footer: MyBrandFooter(),
),
);
Embed it and control navigation yourself:
EbsQrScanner(
config: const EbsQrConfig(instruction: 'Point at a barcode'),
onDetect: (value) => debugPrint('Scanned: $value'),
);
Configuration (EbsQrConfig) #
Colours (accentColor, scrimColor, borderColor, backgroundColor,
foregroundColor), the cut-out (cutOutSizeFactor, min/max size, radius,
vertical position), toggles (showTorch, showGallery, showFlip,
showScanLine), labels/messages, an optional footer widget, allowed
formats, and the initial camera facing. Every field has a sensible default.
License #
MIT — see LICENSE.