Я пытаюсь настроить проверку подлинности телефона в своем приложении, но я застрял с этой ошибкой «Значение типа» (FirebaseUser) → Null «нельзя присвоить переменной типа» (AuthCredential) → void ».". Любая идея о том, как это исправить? Заранее спасибо за помощь!
class _AuthScreenState extends State<AuthScreen> {
String phoneNo;
String smsCode;
String verificationId;
Future<void> verifyPhone() async {
final PhoneCodeAutoRetrievalTimeout autoRetrieve =(String verId) {
this.verificationId = verId;
};
final PhoneCodeSent smsCodeSent = (String verId, [int
forceCodeResend]){
this.verificationId = verId;
};
final PhoneVerificationCompleted verifiedSuccess = (FirebaseUser
user) {
print("Verificado");
};
final PhoneVerificationFailed verifiedFailed = (AuthException
exception) {
print("${exception.message}");
};
await FirebaseAuth.instance.verifyPhoneNumber(
phoneNumber: this.phoneNo,
timeout: const Duration(seconds: 5),
verificationCompleted: verifiedSuccess,
verificationFailed: verifiedFailed,
codeSent: smsCodeSent,
codeAutoRetrievalTimeout: autoRetrieve);
}