frontmost method

Future<String?> frontmost(
  1. List<String> bundleIds
)

The first of bundleIds that is in the foreground, or null when none is.

Implementation

Future<String?> frontmost(List<String> bundleIds) async {
  if (bundleIds.isEmpty) return null;
  final reply = await call('GET', '/frontmost?apps=${Uri.encodeQueryComponent(bundleIds.join(','))}',
      timeout: const Duration(seconds: 5));
  return reply['app'] as String?;
}