logout method
Logs out the currently authenticated user.
Implementation
Future<void> logout() async {
try {
await _authDataService.logout();
_authStateController.add(null);
} catch (e) {
if (e is RdevException) {
throw AuthServiceException(
code: e.code,
message: e.message,
stackTrace: e.stackTrace,
);
}
throw AuthServiceException(
stackTrace: StackTrace.current,
message: e.toString(),
);
}
}