window_watcher 0.0.3+1 copy "window_watcher: ^0.0.3+1" to clipboard
window_watcher: ^0.0.3+1 copied to clipboard

Dart/Flutter package for working with visible windows.

example/lib/main.dart

import 'package:window_watcher/window_watcher.dart';

Future<void> main() async {
  final List<Window> windows = await WindowWatcher.getWindows(
    getExe: true,
  ); //Get list of visible windows
  for (Window window in windows) {
    if ((window.exePath ?? '').startsWith('C:\\')) {
      print(
        window.toString(),
      ); // Print each window with the process executable inside drive C.
    }
    if (window.exePath == null) {
      window.getExePath(); // Update executable path if it's null
    }
    // Show visible windows one by one with 1 second delay
    window.show(forced: true); // With additional forced flag
    await Future.delayed(const Duration(seconds: 1));
  }
}
2
likes
140
points
6
downloads

Publisher

unverified uploader

Weekly Downloads

Dart/Flutter package for working with visible windows.

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

ffi, win32

More

Packages that depend on window_watcher