Skip to content

中国医疗保障局(福建新大陆支付技术有限公司)Flutter插件,该插件仅支持 Android 设备。

License

Notifications You must be signed in to change notification settings

hqwlkj/flutter_chs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3803d56 · Sep 28, 2021

History

16 Commits
Sep 28, 2021
Sep 28, 2021
Sep 28, 2021
Jun 4, 2021
Jun 4, 2021
Jun 4, 2021
Sep 28, 2021
Jun 7, 2021
Sep 22, 2021
Sep 18, 2021
Jun 4, 2021
Sep 18, 2021
Sep 28, 2021

Repository files navigation

Flutter CHS

CHINA HEALTHCARE SECURITY 缩写:CHS

中国医疗保障局(福建新大陆支付技术有限公司)Flutter插件

如果需要微信刷脸的功能请安装 wechat_face_payment 插件。

安装依赖

  // Run this command:
  flutter pub add flutter_chs

这将在包的 pubspec.yaml 中添加这样的一行(并运行一个隐式 dart pub get):

    dependencies:
      dio: ^0.0.1

或者,您的编辑器可能支持 dart pub get 或 flutter pub get。 查看您的编辑器的文档以了解更多信息。

导入依赖

现在在您的 Dart 代码中,您可以使用:

    import 'package:flutter_chs/flutter_chs.dart';

使用

  • 读取身份证
  •     Map<String, dynamic> result = await FlutterChs.readIdCard(timeout: 10);
        print("DEMO-RESULT: $result");
  • 读取社保卡
  •     Map<String, dynamic> result = await FlutterChs.readSocialSecurityCard();
        print("DEMO-RESULT: $result");
  • 开启扫码
  •     Map<String, dynamic> result = await FlutterChs.scanOpen(timeout: 10);
        print("DEMO-RESULT: $result");
  • 开启蜂鸣器总开关
  •     await FlutterChs.beepSwitchOpen;
  • 开启蜂鸣器总开关
  •     await FlutterChs.beepSwitchClose;
  • 寻身份证
  •     Map<String, dynamic> result = await FlutterChs.findIdCard;
        print("DEMO-RESULT: $result");
  • 寻社保卡
  •     Map<String, dynamic> result = await FlutterChs.findHealthCard;
        print("DEMO-RESULT: $result");
  • 多合一(NFC、IC卡、扫描)
  •     /// 可选参数说明
        /// timeout       - 读卡超时时间,单位秒; 默认:30 秒
        /// isIdCard      - 支持身份证 默认:true
        /// isScan        - 支持扫码 默认:true
        /// isHealthCard  - 支持社保卡 默认:true
    
        Map<String, dynamic> result = await FlutterChs.openReadDevice()
        print("DEMO-RESULT: $result");
  • LOADING
  •     /// 显示默认的loading
        
        FlutterChs.showLoading();
    
        /// 显示自定义 `msg` 的 loading
    
        FlutterChs.showLoading(msg: '加载中...');
    
        /// 关闭 loading
        FlutterChs.hideLoading;
        

    返回的数据结构及说明

    {
      "code": int, // 状态码 0:成功 1:失败
      "message": String, // 成功或失败对应的提示信息
      "data": String // 成功后返回对应的数据
    }

    About

    中国医疗保障局(福建新大陆支付技术有限公司)Flutter插件,该插件仅支持 Android 设备。

    Topics

    Resources

    License

    Stars

    Watchers

    Forks

    Packages

    No packages published