logout method

Future<Response> logout()

Sends a logout request to POST /api/logout.

Uses the authenticated Dio client — the server invalidates the current session token. Callers should clear local auth data regardless of whether this call succeeds.

Throws a DioException on network or server error.

Implementation

Future<Response<dynamic>> logout() async {
  return _authenticatedDio.post<dynamic>('/api/logout');
}