majascan_qr 0.5.4 copy "majascan_qr: ^0.5.4" to clipboard
majascan_qr: ^0.5.4 copied to clipboard

A qr code scanner flutter plugin project. Using method channel open native camera page scan QR code. Support iOS, Android.

majascan #

pub link
A QR code scanner flutter plugin project.
Using method channel open native camera page scan qr code.

Publish #

export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087;

flutter packages pub publish --server=https://pub.dartlang.org

Installation #

1. Depend on it #

Add this to your package's pubspec.yaml file:

null-safety:

dependencies:  
  majascan: ^0.5.0
copied to clipboard
dependencies:  
  majascan: ^0.4.0
copied to clipboard

2. Install it #

You can install packages from the command line:
with Flutter:

$ flutter packages get  
copied to clipboard

3. Import it #

Now in your Dart code, you can use:

import 'package:majascan/majascan.dart';  
copied to clipboard

iOS #

Add the the camera usage description to your Info.plist

<key>NSCameraUsageDescription</key>  
<string>Camera permission is required for qrcode scanning.</string>  
copied to clipboard

Android #

For Android, you must do the following before you can use the plugin:
Add the QrCodeScannerActivity to your AndroidManifest.xml
<activity android:name="com.djgeo.majascan.g_scanner.QrCodeScannerActivity"/>

Example #

String qrResult = await MajaScan.startScan(
   title: “QRcode scanner”, 
   barColor: Colors.red, 
   titleColor: Colors.green, 
   qRCornerColor: Colors.blue,
   qRScannerColor: Colors.deepPurple,
   flashlightEnable: true, 
   scanAreaScale: 0.7 /// value 0.0 to 1.0
);
copied to clipboard

Parameters #

title : Navigation bar title.

barColor : Navigation bar color.

titleColor : Navigation bar title color (include back icon).

qRCornerColor : Square color.

qRScannerColor : Scanner line color.

flashlightEnable : Flashlight button enable flag.

scanAreaScale : Center scan area size scale.

1
likes
140
points
28
downloads

Publisher

unverified uploader

Weekly Downloads

2024.07.08 - 2025.01.20

A qr code scanner flutter plugin project. Using method channel open native camera page scan QR code. Support iOS, Android.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on majascan_qr