Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMSVerifyDialog类中,android 端当6位短信验证码输入完后,会同时执行3次onChanged回调里的长度相等判断 #50

Closed
DestinyMing opened this issue Sep 11, 2019 · 2 comments

Comments

@DestinyMing
Copy link

具体问题描述

SMSVerifyDialog 的短信验证框 ,输入完6位的短信验证码的时候,里边的v.length == _codeList.length 的 if 判断 会触发3次,我用provider 代替 了setState(() {});刷新页面,但是还是有问题

@simplezhli
Copy link
Owner

simplezhli commented Sep 11, 2019

身边没有电脑。。我检查了一下代码,怀疑是_controller.text=""这行的调用放在了置空循环的前面,造成多次触发onChange。你尝试将它放在循环后看是否有用。

@DestinyMing
Copy link
Author

是的,确实是放在前边导致的,我用provider也重新做好了替代 了 setState 刷新页面,达到局部刷新的目的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants