sendOtp method
Implementation
@override
Future<AuthResult<void>> sendOtp(String contact, AuthMethod method) async {
try {
if (method == AuthMethod.phone) {
await _auth.signInWithPhoneNumber(contact);
} else {
final user = _auth.currentUser;
if (user != null) {
await user.sendEmailVerification();
}
}
return const AuthResult.success(null);
} on fb.FirebaseAuthException catch (e) {
return AuthResult.failure(AuthException.fromFirebase(e));
}
}