qrbar 0.0.1 copy "qrbar: ^0.0.1" to clipboard
qrbar: ^0.0.1 copied to clipboard

discontinued

A lightweight Flutter package to scan and generate QR codes and barcodes with a clean and unified API.

๐Ÿ“ฆ qrbar #

qrbar is a lightweight Flutter package for scanning and generating QR codes and barcodes.
It wraps common functionality into a clean, unified API โ€” making it easy to integrate with any Flutter app.


โœจ Features #

  • ๐Ÿ“ท Scan QR codes and various barcodes using the device camera
  • ๐Ÿงพ Generate QR codes or barcodes as Flutter widgets
  • ๐ŸŽจ Customizable output: size, foreground/background color
  • ๐Ÿ”’ Clean and minimal API with no third-party exposure
  • ๐Ÿ” Supports multiple formats including QR, Code128, EAN13, UPC, PDF417, Aztec, DataMatrix

โœ… Platform Support #

Platform Generate Scan
Android โœ… โœ…
iOS โœ… โœ…
Web โœ… (QR only) โŒ
Windows โœ… (QR only) โŒ
macOS โœ… (QR only) โŒ
Linux โœ… (QR only) โŒ

โš ๏ธ Camera-based scanning is only supported on Android and iOS.


๐Ÿš€ Installation #

Add the dependency to your pubspec.yaml:

dependencies:
  qrbar: ^0.0.1

Then run:

flutter pub get

โš™๏ธ Platform Setup (for Scanning) #

Android #

In android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.CAMERA" />
<application>
  ...
</application>

In android/app/build.gradle:

minSdkVersion 21

iOS #

In ios/Runner/Info.plist:

<key>NSCameraUsageDescription</key>
<string>Camera access is required for scanning QR and barcodes.</string>

๐Ÿ’ก Quick Usage #

Generate a QR Code #

import 'package:qrbar/qrbar.dart';

QrBarGenView(
  data: 'https://example.com',
  type: QrBarType.qr,
  size: 200,
);

Generate a Barcode #

QrBarGenView(
  data: '1234567890',
  type: QrBarType.c128,
  size: 200,
);

Scan a QR or Barcode #

QrBarScanView(
  onScan: (QrBarScanResult result) {
    print('Scanned: ${result.value} (${result.type.label})');
  },
);

๐Ÿงฑ API Reference #

Code Type #

enum QrBarType {
  qr, c128, ean13, upc, pdf417, aztec, dm
}

Generator Config #

class QrBarGenOpts {
  final String data;
  final QrBarType type;
  final double size;
  final Color bg;
  final Color fg;
}

Scan Result #

class QrBarScanResult {
  final String value;
  final QrBarType type;
  final DateTime time;
}

๐Ÿ“‚ Example App #

A full working demo is available in the example/ folder.


๐Ÿ”— Repository #

github.com/sovanken/qrbar


๐Ÿ“„ License #

MIT License ยฉ 2025 Sovanken

4
likes
0
points
28
downloads

Publisher

verified publishersovanken.blog

Weekly Downloads

A lightweight Flutter package to scan and generate QR codes and barcodes with a clean and unified API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

barcode_widget, flutter, mobile_scanner, qr_flutter

More

Packages that depend on qrbar