listRunningApps method

  1. @override
Future<List<RunningApp>> listRunningApps()
override

Implementation

@override
Future<List<RunningApp>> listRunningApps() async {
  final apps = <RunningApp>[];
  try {
    final result = await Process.run('osascript', [
      '-e',
      'tell application "System Events" to get {bundle identifier, name} of every process whose background only is false',
    ]);
    // Parse result — simplified
  } catch (_) {}
  return apps;
}