getForegroundSessionId method
Gets the foreground session ID and workspace path.
Implementation
Future<ForegroundSessionInfo> getForegroundSessionId() async {
_ensureConnected();
final result = await _connection!.sendRequest(
'session.getForeground',
<String, dynamic>{},
const Duration(seconds: 5),
) as Map<String, dynamic>;
return ForegroundSessionInfo.fromJson(result);
}