logout method

Future<void> logout()

Logout and clear tokens

Implementation

Future<void> logout() async {
  try {
    if (isAuthenticated) {
      // Call logout endpoint if available
      await _dio.post('/rest/V1/customers/logout');
    }
  } catch (e) {
    print('Logout API call failed: $e');
  } finally {
    await _clearTokens();
  }
}