@@ -27,15 +27,15 @@ English | [简体中文](./README-ZH.md)
2727 - [ Listening events] ( #listening-events )
2828 - [ Quit on close] ( #quit-on-close )
2929 - [ macOS] ( #macos )
30- - [ Windows] ( #windows )
3130 - [ Confirm before closing] ( #confirm-before-closing )
3231 - [ Hidden at launch] ( #hidden-at-launch )
3332 - [ macOS] ( #macos-1 )
34- - [ Windows] ( #windows-1 )
33+ - [ Windows] ( #windows )
3534 - [ Who's using it?] ( #whos-using-it )
3635 - [ API] ( #api )
3736 - [ WindowManager] ( #windowmanager )
3837 - [ Methods] ( #methods )
38+ - [ destroy ` macos ` ` windows ` ] ( #destroy--macos--windows )
3939 - [ close] ( #close )
4040 - [ isPreventClose] ( #ispreventclose )
4141 - [ setPreventClose] ( #setpreventclose )
@@ -118,7 +118,7 @@ Add this to your package's `pubspec.yaml` file:
118118
119119``` yaml
120120dependencies :
121- window_manager : ^0.1.7
121+ window_manager : ^0.1.8
122122` ` `
123123
124124Or
@@ -271,24 +271,6 @@ class AppDelegate: FlutterAppDelegate {
271271}
272272```
273273
274- ##### Windows
275-
276- Change the file ` windows/runner/main.cpp ` as follows:
277-
278- ``` diff
279- int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
280- _In_ wchar_t *command_line, _In_ int show_command) {
281- // ...
282-
283- - window.SetQuitOnClose(true);
284- + window.SetQuitOnClose(false);
285-
286- // ...
287-
288- return EXIT_SUCCESS;
289- }
290- ```
291-
292274#### Confirm before closing
293275
294276``` dart
@@ -459,6 +441,11 @@ class _HomePageState extends State<HomePage> with WindowListener {
459441
460442#### Methods
461443
444+ ##### destroy ` macos ` ` windows `
445+
446+ Force closing the window.
447+
448+
462449##### close
463450
464451Try to close the window.
0 commit comments