sendEmailVerification method
EmailVerification - MAIL VERIFICATION This method sends a verification email to the user's email address. It handles FirebaseAuthException to provide custom error messages. @throws String if the email verification fails due to an authentication error.
Implementation
Future<void> sendEmailVerification() async {
try {
await _auth.currentUser?.sendEmailVerification();
} on FirebaseAuthException catch (e) {
final ex = TExceptions.fromCode(e.code);
throw ex.message;
} catch (_) {
const ex = TExceptions();
throw ex.message;
}
}