import 'package:flutter/cupertino.dart'; import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_state.dart'; import 'package:star_lock/tools/baseGetXController.dart'; class PersonInfoEditAccountLogic extends BaseGetXController { final PersonInfoEditAccountState state = PersonInfoEditAccountState(); // late Timer _timer; // void _startTimer() { // _timer = Timer.periodic(1.seconds, (timer) { // if (state.currentSecond > 1) { // state.currentSecond--; // } else { // _cancelTimer(); // state.currentSecond = state.totalSeconds; // } // state.resetResend(); // }); // } // // void _cancelTimer() { // _timer.cancel(); // } //获取验证码请求 // void sendValidationCode() async { // var entity = await ApiRepository.to.getValidationCodeAuth( // state.countryCode.value, // state.loginData.value.mobile!, // state.channel.value, // state.codeType.value, // state.uniqueid.value, // state.xWidth.value.toString()); // if (entity.errorCode!.codeIsSuccessful) { // _startTimer(); // } else {} // } void checkNext(TextEditingController controller) { changeInput(controller); } void changeInput(TextEditingController controller) { if (controller == state.codeController) { state.verificationCode.value = controller.text; } _resetCanSub(); } void _resetCanSub() { state.canSub.value = state.codeIsOK; } @override void onInit() { super.onInit(); state.initLoginData(); } }