flutter_chs

Last updated:

0 purchases

flutter_chs Image
flutter_chs Images
Add to Cart

Description:

flutter chs

Flutter CHS
CHINA HEALTHCARE SECURITY 缩写:CHS
中国医疗保障局(福建新大陆支付技术有限公司)Flutter插件
如果需要微信刷脸的功能请安装 wechat_face_payment 插件。
安装依赖 #
// Run this command:
flutter pub add flutter_chs

copied to clipboard
这将在包的 pubspec.yaml 中添加这样的一行(并运行一个隐式 dart pub get):
dependencies:
dio: ^0.0.1
copied to clipboard
或者,您的编辑器可能支持 dart pub get 或 flutter pub get。 查看您的编辑器的文档以了解更多信息。
导入依赖 #
现在在您的 Dart 代码中,您可以使用:
import 'package:flutter_chs/flutter_chs.dart';
copied to clipboard
使用 #
读取身份证
Map<String, dynamic> result = await FlutterChs.readIdCard(timeout: 10);
print("DEMO-RESULT: $result");
copied to clipboard
读取社保卡
Map<String, dynamic> result = await FlutterChs.readSocialSecurityCard();
print("DEMO-RESULT: $result");
copied to clipboard
开启扫码
Map<String, dynamic> result = await FlutterChs.scanOpen(timeout: 10);
print("DEMO-RESULT: $result");
copied to clipboard
开启蜂鸣器总开关
await FlutterChs.beepSwitchOpen;
copied to clipboard
开启蜂鸣器总开关
await FlutterChs.beepSwitchClose;
copied to clipboard
寻身份证
Map<String, dynamic> result = await FlutterChs.findIdCard;
print("DEMO-RESULT: $result");
copied to clipboard
寻社保卡
Map<String, dynamic> result = await FlutterChs.findHealthCard;
print("DEMO-RESULT: $result");
copied to clipboard
多合一(NFC、IC卡、扫描)
/// 可选参数说明
/// timeout - 读卡超时时间,单位秒; 默认:30 秒
/// isIdCard - 支持身份证 默认:true
/// isScan - 支持扫码 默认:true
/// isHealthCard - 支持社保卡 默认:true

Map<String, dynamic> result = await FlutterChs.openReadDevice()
print("DEMO-RESULT: $result");
copied to clipboard
LOADING
/// 显示默认的loading

FlutterChs.showLoading();

/// 显示自定义 `msg` 的 loading

FlutterChs.showLoading(msg: '加载中...');

/// 关闭 loading
FlutterChs.hideLoading;

copied to clipboard
返回的数据结构及说明

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

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.