0 purchases
desktop lifecycle
desktop_lifecycle #
Allow your flutter desktop application to perceive whether the window is activated.
Getting Started #
Add desktop_lifecycle to your pubspec.yaml.
desktop_lifecycle: $latest_version
copied to clipboard
Then you can use DesktopLifecycle.instance.isActive to listen window active event.
final ValueListenable<bool> event = DesktopLifecycle.instance.isActive;
final bool active = event.value;
event.addListener(() {
debugPrint("window activate: ${event.value}");
});
copied to clipboard
LICENSE #
see LICENSE file
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.