resendEmail method

Future<void> resendEmail()

Resends a ConfirmationCode to the specified email.

Implementation

Future<void> resendEmail() async {
  _setResendEmailTimer();

  try {
    await _authService.createConfirmationCode(email: UserEmail(email.text));
  } on AddUserEmailException catch (e) {
    emailCode.error.value = e.toMessage();
  } catch (e) {
    emailCode.error.value = 'err_data_transfer'.l10n;
    _setResendEmailTimer(false);
    rethrow;
  }
}