closeSession method
Implementation
@override
Future<void> closeSession(String sessionId) async {
if (sessionId.trim().isEmpty) {
throw AppleFoundationException(
'Session ID cannot be empty',
code: 'INVALID_SESSION_ID',
);
}
try {
await _invokeMethodWithTimeout<void>('closeSession', {
'sessionId': sessionId,
});
} catch (e) {
_logError('closeSession', e);
throw AppleFoundationException(
'Failed to close session: ${e.toString()}',
code: 'CLOSE_SESSION_FAILED',
details: {'sessionId': sessionId},
);
}
}