Coder Social home page Coder Social logo

Comments (9)

lijy91 avatar lijy91 commented on June 5, 2024

麻烦提供下你的代码和截图,还有测试的手机型号

from flutter_aliyun_captcha.

Godfather6666 avatar Godfather6666 commented on June 5, 2024

class FlutterAliyunCaptcha extends StatelessWidget {

final AliyunCaptchaController _captchaController = AliyunCaptchaController();

@OverRide
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color.fromRGBO(0, 0, 0, 0.8),
body: Container(
padding: EdgeInsets.symmetric(horizontal: 60.w),
alignment: Alignment.center,
child: Container(
padding: EdgeInsets.all(20.w),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(16.w),
),
child: SizedBox(
width: 520.w,
child: Container(
width: 520.w,
height: 100.w,
child: AliyunCaptchaButton(
controller: _captchaController,
type: AliyunCaptchaType.slide, // 重要:请设置正确的类型
option: AliyunCaptchaOption(
appKey: '****************',
scene: '*****',
language: 'cn',
// 更多参数请参见:https://help.aliyun.com/document_detail/193141.html
),
onSuccess: (dynamic data) {
print(
"滑块成功----------------$data"); // {"sig": "...", "token": "..."}
},
onFailure: (String failCode) {},
onError: (String errorCode) {},
),
),
),
),
),
);
}
}

from flutter_aliyun_captcha.

Godfather6666 avatar Godfather6666 commented on June 5, 2024

0073E9FC2119EEE2248EB803523D221E

from flutter_aliyun_captcha.

Godfather6666 avatar Godfather6666 commented on June 5, 2024

这个就是无法自定义宽度的代码和截图,如果宽度不够会出现滚动条

from flutter_aliyun_captcha.

Godfather6666 avatar Godfather6666 commented on June 5, 2024

设备型号是:华为荣耀8X

from flutter_aliyun_captcha.

lijy91 avatar lijy91 commented on June 5, 2024

刚确认了问题出现的原因,宽度小于 300px 时SDK会将宽度设置为300px。

from flutter_aliyun_captcha.

Godfather6666 avatar Godfather6666 commented on June 5, 2024

这个是阿里滑块的问题吗

from flutter_aliyun_captcha.

lijy91 avatar lijy91 commented on June 5, 2024

阿里的SDK做了这个限制,所以无法在插件中解决。

滑块验证:宽度 >= 300px
智能验证:宽度 >= 302px

测出来这两个值是最小宽度的限制值,只能你那边界面做一下调整了。

from flutter_aliyun_captcha.

Godfather6666 avatar Godfather6666 commented on June 5, 2024

了解了,谢谢

from flutter_aliyun_captcha.

Related Issues (17)

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.