Search code examples
flutterflutter-layoutflutter-dependenciesflutter-animationflutter-test

How to catch the window close event in flutter?


I working on a flutter windows application. I need to show an alert box when closing the application also I need to kill another process when closing this application. Is there any way to catch the window_close event on flutter?


Solution

  • this package supports all windows events.

    https://pub.dev/packages/window_manager

    here is the method link

    https://pub.dev/packages/window_manager#onwindowclose