signOut method
Signs out the logged in user
Implementation
@override
Future<void> signOut() async {
// notify listeners of user stream by adding an empty
// User instance to the user stream controller
await _enqueueEvent(const LoggedOutEvent());
try {
final result = await _amplifyAuth.signOut();
_logger.fine('Successfully signed out: $result');
} on aws_cognito.AuthException catch (e, stackTrace) {
throw SignOutException(
message: 'Failed to sign out user',
innerException: e,
innerStackTrace: stackTrace,
);
}
}