hb_qr 0.0.2 copy "hb_qr: ^0.0.2" to clipboard
hb_qr: ^0.0.2 copied to clipboard

快速扫描与识别二维码, 生成二维码。

hb_qr #

二维码扫描, 生成二维码。

使用方法 #

生成二维码

  1. 生成二维码 widget
HbQrBox(data: 'https://www.jewel.io');

扫描二维码

  • 需要添加权限和国际化配置
  1. 国际化初始化
 MaterialApp(
  localizationsDelegates: const <LocalizationsDelegate<
        Object?>>[
      //...
      HbQrLocalizations.delegate,
    ],
  )
  1. 权限配置
  • Android, AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA"/>
  • iOS,ios/Runner/Info.plist
<key>NSCameraUsageDescription</key>
<string>我们需要使用摄像头来扫描二维码</string>
  1. 使用:扫描二维码
final result = await HbQr.scan();
// result如果为空则表示没有识别到二维码
0
likes
30
points
96
downloads

Publisher

unverified uploader

Weekly Downloads

快速扫描与识别二维码, 生成二维码。

License

MIT (license)

Dependencies

easy_debounce, flutter, flutter_localizations, flutter_screenutil, image_picker, intl, mobile_scanner, permission_handler, qr_flutter

More

Packages that depend on hb_qr