


# checkEmailVerification method




    *[<Null safety>](https://dart.dev/null-safety)*




[FutureOr](https://api.flutter.dev/flutter/dart-async/FutureOr-class.html)&lt;void> checkEmailVerification
()








## Implementation

```dart
FutureOr<void> checkEmailVerification() async {
  emit(state.copyWith(status: FormStatus.submissionInProgress));

  final refresh = await authenticationRepository.refresh();
  if (refresh.isErr) {
    final refreshError = refresh.err!;
    emit(
      EmailVerificationState(
        errorMessage: refreshError.message,
        status: FormStatus.submissionFailure,
      ),
    );
    return;
  }

  final wrapper = await authenticationRepository.sessionStream().last;
  final currentAccount = wrapper.session?.account;
  if (currentAccount != null) {
    emit(
      state.copyWith(
        isVerified: currentAccount.emailVerified,
        status: FormStatus.submissionSuccess,
      ),
    );
  } else {
    const EmailVerificationState(
      errorMessage: 'No current session',
      status: FormStatus.submissionFailure,
    );
  }
}
```







