resendEmail method

Future<void> resendEmail()

Resends a ConfirmationCode to the unconfirmed email of the authenticated MyUser.

Implementation

Future<void> resendEmail() async {
  try {
    await _myUserService.addUserEmail(
      email!,
      locale: L10n.chosen.value?.toString(),
    );
    resent.value = true;
    _setResendEmailTimer(true);
  } on AddUserEmailException catch (e) {
    code.error.value = e.toMessage();
  } catch (e) {
    MessagePopup.error(e);
    rethrow;
  }
}