Skip to content

Commit cc74c29

Browse files
committed
0.1.8
1 parent aaf1cac commit cc74c29

File tree

6 files changed

+19
-44
lines changed

6 files changed

+19
-44
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.1.8
2+
3+
- Add `WindowCaption` widget. #81
4+
- [macos & windows] Implement `destroy` method
5+
16
## 0.1.7
27

38
- Implement `setAspectRatio` method #74

README-ZH.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@
2727
- [监听事件](#监听事件)
2828
- [关闭时退出](#关闭时退出)
2929
- [macOS](#macos)
30-
- [Windows](#windows)
3130
- [关闭前确认](#关闭前确认)
3231
- [在启动时隐藏](#在启动时隐藏)
3332
- [macOS](#macos-1)
34-
- [Windows](#windows-1)
33+
- [Windows](#windows)
3534
- [谁在用使用它?](#谁在用使用它)
3635
- [API](#api)
3736
- [WindowManager](#windowmanager)
@@ -118,7 +117,7 @@
118117

119118
```yaml
120119
dependencies:
121-
window_manager: ^0.1.7
120+
window_manager: ^0.1.8
122121
```
123122
124123
@@ -271,24 +270,6 @@ class AppDelegate: FlutterAppDelegate {
271270
}
272271
```
273272

274-
##### Windows
275-
276-
更改文件 `windows/runner/main.cpp` 如下:
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-
292273
#### 关闭前确认
293274

294275
```dart

README.md

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -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
120120
dependencies:
121-
window_manager: ^0.1.7
121+
window_manager: ^0.1.8
122122
```
123123
124124
Or
@@ -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

464451
Try to close the window.

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ packages:
197197
path: ".."
198198
relative: true
199199
source: path
200-
version: "0.1.7"
200+
version: "0.1.8"
201201
sdks:
202202
dart: ">=2.14.0 <3.0.0"
203203
flutter: ">=1.20.0"

lib/src/window_manager.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ class WindowManager {
9393
}
9494

9595
/// Force closing the window.
96+
///
97+
/// @platforms macos,windows
9698
Future<void> destroy() async {
9799
await _channel.invokeMethod('destroy');
98100
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: window_manager
22
description: This plugin allows Flutter desktop apps to resizing and repositioning the window.
3-
version: 0.1.7
3+
version: 0.1.8
44
homepage: https://github.com/leanflutter/window_manager
55

66
environment:

0 commit comments

Comments
 (0)