onAuthenticated method

Future<void> onAuthenticated(
  1. TokenPair tokens
)

Saves the token pair and emits Authenticated. Call this after a successful login.

Implementation

Future<void> onAuthenticated(TokenPair tokens) async {
  await _tokenStorage.saveTokenPair(tokens);
  emit(const Authenticated());
}