Flutter 用于创建电话验证凭据的sms验证码无效

Flutter 用于创建电话验证凭据的sms验证码无效,flutter,authentication,dart,firebase-authentication,Flutter,Authentication,Dart,Firebase Authentication,我怎样才能解决这个问题呢。。已在我的颤振应用程序中实现电话身份验证。短信代码在我的设备上发送,但我在验证发送的短信代码时遇到问题。我怎样才能解决这个问题 this is the error: [firebase_auth/invalid-verification-code] The sms verification code used to create the phone auth credential is invalid 以下是我的VERIFYPHONE功能: await _a

我怎样才能解决这个问题呢。。已在我的颤振应用程序中实现电话身份验证。短信代码在我的设备上发送,但我在验证发送的短信代码时遇到问题。我怎样才能解决这个问题

 this is the error:
   [firebase_auth/invalid-verification-code] The sms verification code used to create the phone auth credential is invalid
以下是我的VERIFYPHONE功能:

await  _auth.verifyPhoneNumber(
             phoneNumber: _phoneController.text.toString().trim(),
             verificationCompleted: (phoneAuthCredential)async{
                 setState(() {
                   showloading = false;
                 });

                 signInWithPhoneAuthCredentials(phoneAuthCredential);
             },
             verificationFailed: (verificationFailed)async{
               setState(() {
                 showloading = false;
               });
               // ${verificationFailed.message}
              _scaffoldKey.currentState.showSnackBar(SnackBar(content: new Text("VerificationFailed::${verificationFailed.message}" )));

              debugPrint("ERROR PHONE VERIFY::::: ${verificationFailed.message}");
             },
             codeSent: (verificationId, resendingToken)async{

             setState(() {
               showloading = false;
               currentState = MobileVerificationState.SHOW_OTP_FORM_STATE;
               verificationCode = verificationId;

             });
             },
             codeAutoRetrievalTimeout:(verificationId)async{

             });

如果不了解您是如何实现电话身份验证的,或者您是否使用了一些插件,很难说什么是错误的?你测试过了吗?您必须在Firebase console+中添加任何伪代码,以便在调试期间进行测试。您是否在阅读带有绿色背景色的中间文章?如果是这样,请删除您的
codeSent
功能中的
sms代码“xxxx”
。如果您编辑了我的帖子,请检查。。。