deleteSession method
Delete session
Logout the user. Use 'current' as the session ID to logout on this device, use a session ID to logout on another device. If you're looking to logout the user on all devices, use Delete Sessions instead.
Implementation
Future deleteSession({required String sessionId}) async {
final String apiPath =
'/account/sessions/{sessionId}'.replaceAll('{sessionId}', sessionId);
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}