updateSession method
Update the current session's properties.
Implementation
Future<({bool resuming, Duration timeout})> updateSession({
bool? resuming,
Duration? timeout,
}) async {
final response = jsonDecode(await _executeSafe(
'PATCH',
'/v4/sessions/${connection.sessionId}',
body: {
if (resuming != null) 'resuming': resuming,
if (timeout != null) 'timeout': timeout.inSeconds,
},
)) as Map<String, Object?>;
return (
resuming: response['resuming'] as bool,
timeout: Duration(seconds: response['timeout'] as int),
);
}