1 Star 1 Fork 0

LeanFlutter / flutter_yunpian_captcha

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

flutter_yunpian_captcha

适用于 Flutter 的云片行为验证插件

pub version

屏幕截图

快速开始

安装

将此添加到包的 pubspec.yaml 文件中:

dependencies:
  flutter_yunpian_captcha: ^0.0.1

您可以从命令行安装软件包:

$ flutter packages get

用法

获取 SDK 版本

String sdkVersion = await YunPianCaptcha.sdkVersion;

初始化 SDK

YunPianCaptcha.init('<captchaId>');

开始验证

响应码请参与:https://www.yunpian.com/official/document/sms/zh_CN/captcha_captcha_service_ios

YunPianCaptchaConfig config = YunPianCaptchaConfig(
  // 请求验证码过期时限。单位秒,默认 30
  expired: 30,
  // 支持语言,默认简体中文。zh-cn(简体中文)、en(英文)
  lang: 'zh-cn',
  // 验证码语言包。当设置 langPack 后 lang 设置会自动失效。
  // YPcaptcha_02 // 默认:请按顺序点击:
  // YPcaptcha_03 // 默认:向右拖动滑块填充拼图
  // YPcaptcha_04 // 默认:验证失败,请重试
  langPack: {
    'YPcaptcha_02': '请按顺序点击:',
    'YPcaptcha_03': '向右拖动滑块填充拼图',
    'YPcaptcha_04': '验证失败,请重试',
  },
  // 视图透明度。默认 0.3
  alpha: 0.3,
  // 是否显示加载指示器。默认显示
  showLoadingView: true,
  // 添加无感验证参数
  username: 'yunpian-captcha',
);
await YunPianCaptcha.verify(
  config: config,
  onLoaded: () {
    // do something
  },
  onSuccess: (dynamic data) {
    // do something
  },
  onFail: (dynamic data) {
    // do something
  },
);

相关链接

许可证

MIT License

Copyright (c) 2020 LiJianying <lijy91@foxmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License Copyright (c) 2020 LiJianying <lijy91@foxmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

适用于 Flutter 的云片行为验证插件 展开 收起
Dart
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Dart
1
https://gitee.com/leanflutter/flutter_yunpian_captcha.git
git@gitee.com:leanflutter/flutter_yunpian_captcha.git
leanflutter
flutter_yunpian_captcha
flutter_yunpian_captcha
master

搜索帮助