verifyOTP method

bool verifyOTP({
  1. required String email,
  2. required String otp,
})

Verify the OTP that inputed by the user.

email: The email address of the user.

otp: The OTP to verify.

Implementation

bool verifyOTP({required String email, required String otp}) {
  if (_finalEmail == '' || _finalOTP == '') {
    return false;
  }
  if (email.trim() == _finalEmail && otp.trim() == _finalOTP) {
    return true;
  }
  return false;
}