logout method

Future<void> logout()

Logs out the current user.

Sends a POST request to the logout endpoint. Errors are caught internally.

Implementation

Future<void> logout() async {
  try {
    await _makeRequest('/api/token-auth/logout/', method: 'POST');
  } catch (e) {
    // Handle logout error if needed
  }
}