flutter_yidun_captcha

pub version

适用于 Flutter 的网易易盾行为式验证码插件


屏幕截图

快速开始

安装

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

dependencies:
  flutter_yidun_captcha: ^0.1.0

dependencies:
  flutter_yidun_captcha:
    git:
      url: https://github.com/leanflutter/flutter_yidun_captcha.git
      ref: main

用法

获取 SDK 版本

String sdkVersion = await YidunCaptcha.sdkVersion;

开始验证

YidunCaptchaConfig config = YidunCaptchaConfig(
  captchaId: '<captchaId>',
  // mode: 'MODE_INTELLIGENT_NO_SENSE',
  timeout: 6000,
  languageType: 'LANG_ZH_CN',
);
await YidunCaptcha.verify(
  config: config,
  onReady: () {
    _addLog('onReady', null);
  },
  onValidate: (dynamic data) {
    _addLog('onValidate', data);
  },
  onClose: (dynamic data) {
    _addLog('onClose', data);
  },
  onError: (dynamic data) {
    _addLog('onError', data);
  },
);

相关链接

许可证

MIT

Libraries

flutter_yidun_captcha
yidun_captcha
yidun_captcha_config