Giter VIP home page Giter VIP logo

pda_scanner's Introduction

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.3

Supported

  • SEUIC(小码哥)-PDA
  • IData(盈达聚力)-PDA
  • UROVO(优博讯)-PDA
  • HONEYWELL(霍尼韦尔) 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
  }
}

/// 手动初始化 PdaSource.
PdaSource.init();

/// 手动释放 PdaSource 相关资源.
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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.