isIdle method
Returns if this screen is idling, which means that no app is opened
Implementation
Future<bool> isIdle() async {
HttpClientResponse? response;
try {
response = await send('GET', '/apps');
if (response.statusCode == 302) {
return false;
}
return true;
} finally {
if (response != null) {
await response.drain();
}
}
}