desktop_lifecycle 0.1.0 desktop_lifecycle: ^0.1.0 copied to clipboard
Allow your flutter desktop application to perceive whether the window is activated.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add desktop_lifecycle
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
desktop_lifecycle: ^0.1.0
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:desktop_lifecycle/desktop_lifecycle.dart';