pda_scanner 0.2.7

Flutter Android iOS

This is a scanning plug-in for PDA to listen the scanned events and get scanning results.

PDA Scanner #

License Pub

A Flutter plugin 🛠 to scanning. Ready for PDA 🚀

github

pda_scanner.gif

Installation #

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

dependencies:
 pda_scanner: ^0.2.7

Supported #

  • [x] SEUIC(小码哥)-PDA
  • [x] IData(盈达聚力)-PDA
  • [x] UROVO(优博讯)-PDA
  • [x] HONEYWELL(霍尼韦尔)-PDA
  • [x] PL(攀凌)-PDA

Usage #

/// 导入依赖
import 'package:pda_scanner/pda_source.dart';
import 'package:pda_scanner/pda_listener_mixin.dart';
import 'package:pda_scanner/pda_lifecycle_mixin.dart';

/// 第一种方式:自动管理pda生命周期 (自动初始化和自动释放),使用PdaLifecycleMixin混入app根组件状态。
class RootWidgetState extends State<RootWidget> with PdaLifecycleMixin {
  @override
  Widget build(BuildContext context) {
    // TODO
  }
}

/// 第二种方式:手动管理pda生命周期 (手动始化和自动释放)。
PdaSource.init();
PdaSource.dispose();

class PageAlpha extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => PageAlphaState();
}

/// 混入 PdaListenerMixin 监听扫码事件
class PageAlphaState extends State<PageAlpha> with PdaListenerMixin {
  var _code;

  @override
  Widget build(BuildContext context) {
    return null;
  }

  @override
  void onEvent(Object event) {
      // TODO: implement onEvent
  }
  
    @override
  void onError(Object error) {
      // TODO: implement onError
  }
}

Contribute #

We would ❤️ to see your contribution!

License #

Distributed under the MIT license. See LICENSE for more information.

About #

Created by Shusheng.

4
likes
100
pub points
52%
popularity

This is a scanning plug-in for PDA to listen the scanned events and get scanning results.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

leyansorosame@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on pda_scanner