0

I am working on flutter desktop application and want to show alert dialog before closing window. Could not get any information about detecting window closing action.

Can anyone tell me how to do this. Thankx.

Dev94
  • 757
  • 6
  • 24
  • This is a duplicate of https://stackoverflow.com/questions/63115627/flutter-desktop-how-to-catch-closure-button/63128108#63128108 – smorgan Mar 27 '21 at 23:05
  • Could you please help me out for code. I don't know exactly how to do that. – Dev94 Mar 29 '21 at 07:20

1 Answers1

2

You can do it using the existing flutter_window_close package. Check out the example here.

This plugin lets your Flutter app a chance to confirm if the user wants to close your app. It works on desktop platforms including Windows, macOS and Linux.

Try to explore as well bitsdojo_window.

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65