提交 06453845 authored 作者: 祁增奎's avatar 祁增奎

增加定时器拦截

上级 13c95356
...@@ -119,6 +119,9 @@ class CLXCodeManageLogic extends GetxController { ...@@ -119,6 +119,9 @@ class CLXCodeManageLogic extends GetxController {
/// 开启倒计时 /// 开启倒计时
_startCountdown({bool isSmsSend = true}) { _startCountdown({bool isSmsSend = true}) {
if (countdown.value != 60) {
return;
}
timer = Timer.periodic(const Duration(seconds: 1), (timer) { timer = Timer.periodic(const Duration(seconds: 1), (timer) {
if (countdown.value == 0) { if (countdown.value == 0) {
timer.cancel(); timer.cancel();
......
name: clx_verification_code name: clx_verification_code
description: "A new Flutter package project." description: "A new Flutter package project."
version: 0.0.1 version: 0.0.2
homepage: homepage:
environment: environment:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论