desktop_lifecycle 0.1.1 copy "desktop_lifecycle: ^0.1.1" to clipboard
desktop_lifecycle: ^0.1.1 copied to clipboard

Allow your flutter desktop application to perceive whether the window is activated.

desktop_lifecycle #

Pub

Allow your flutter desktop application to perceive whether the window is activated.

Getting Started #

  1. Add desktop_lifecycle to your pubspec.yaml.
  desktop_lifecycle: $latest_version
  1. 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}");
});

LICENSE #

see LICENSE file

28
likes
150
pub points
92%
popularity

Publisher

verified publishermixin.dev

Allow your flutter desktop application to perceive whether the window is activated.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on desktop_lifecycle