Skip to content

Commit e985a7d

Browse files
committed
v0.2.2
1 parent 66281e3 commit e985a7d

File tree

7 files changed

+138
-93
lines changed

7 files changed

+138
-93
lines changed

CHANGELOG.md

Lines changed: 74 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,124 @@
1+
## 0.2.2
2+
3+
* Fixed overflow error after minimize #55, #119, #125
4+
* Implement `isSkipTaskbar` method #117
5+
* [windows] Implement setIcon method #129
6+
* The `waitUntilReadyToShow` method adds options, callback parameters #111
7+
18
## 0.2.1
29

3-
- Compatible with lower versions of dart #98
4-
- [macos & windows] Add `resized`, `moved` events. #28
5-
- [linux] Implement `getTitleBarHeight` metnod #49
6-
- [linux] Implement `getOpacity` metnod #44
7-
- Add `TitleBarStyle` enum #99
8-
- [linux] Implement `setAlwaysOnBottom` method #100
9-
- [windows] Removes crazy jittering when resizing window #103
10-
- [windows] Fix overflow on fullscreen and maximize #105
11-
- [windows] Implement `setHasShadow` and `hasShadow` methods #110
12-
- [windows] Fix setAlignment(Alignment.bottomRight) display position is not correct #112 #113
10+
* Compatible with lower versions of dart #98
11+
* [macos & windows] Add `resized`, `moved` events. #28
12+
* [linux] Implement `getTitleBarHeight` metnod #49
13+
* [linux] Implement `getOpacity` metnod #44
14+
* Add `TitleBarStyle` enum #99
15+
* [linux] Implement `setAlwaysOnBottom` method #100
16+
* [windows] Removes crazy jittering when resizing window #103
17+
* [windows] Fix overflow on fullscreen and maximize #105
18+
* [windows] Implement `setHasShadow` and `hasShadow` methods #110
19+
* [windows] Fix setAlignment(Alignment.bottomRight) display position is not correct #112 #113
1320

1421
## 0.2.0
1522

16-
- [linux] Implement `setTitleBarStyle` method
17-
- [linux] Implement `startResizing` method
18-
- [windows] Implement `setProgressBar` method #42
19-
- [macos & windows] Implement `setIgnoreMouseEvents` metnod #89
20-
- Update `DragToResizeArea` widget
21-
- Add `VirtualWindowFrame` widget
22-
- Update `WindowCaption` widget
23+
* [linux] Implement `setTitleBarStyle` method
24+
* [linux] Implement `startResizing` method
25+
* [windows] Implement `setProgressBar` method #42
26+
* [macos & windows] Implement `setIgnoreMouseEvents` metnod #89
27+
* Update `DragToResizeArea` widget
28+
* Add `VirtualWindowFrame` widget
29+
* Update `WindowCaption` widget
2330

2431
## 0.1.9
2532

26-
- Fixed Visual bug in fullScreen #83
27-
- Update `WindowCaption` widget.
33+
* Fixed Visual bug in fullScreen #83
34+
* Update `WindowCaption` widget.
2835

2936
## 0.1.8
3037

31-
- Add `WindowCaption` widget. #81
32-
- [macos & windows] Implement `destroy` method
38+
* Add `WindowCaption` widget. #81
39+
* [macos & windows] Implement `destroy` method
3340

3441
## 0.1.7
3542

36-
- Implement `setAspectRatio` method #74
37-
- [windows] Reimplement `getTitleBarHeight` method #33
38-
- [windows] Implement `startResizing` method
39-
- [windows] Add `DragToResizeArea` widget
40-
- [windows] Fix maximize and minimize animation not working when there is title bar hidden
43+
* Implement `setAspectRatio` method #74
44+
* [windows] Reimplement `getTitleBarHeight` method #33
45+
* [windows] Implement `startResizing` method
46+
* [windows] Add `DragToResizeArea` widget
47+
* [windows] Fix maximize and minimize animation not working when there is title bar hidden
4148

4249
## 0.1.6
4350

44-
- Implement `isPreventClose` & `setPreventClose` methods #69
45-
- Implement `close` event
46-
- [macos & windows] Reimplement `close` method
47-
- [windows] Fix Horizontal resizing not working on secondary display. #71
48-
- [macos] Implement `isFocused` method
49-
- Implement `setAlignment` method #52
51+
* Implement `isPreventClose` & `setPreventClose` methods #69
52+
* Implement `close` event
53+
* [macos & windows] Reimplement `close` method
54+
* [windows] Fix Horizontal resizing not working on secondary display. #71
55+
* [macos] Implement `isFocused` method
56+
* Implement `setAlignment` method #52
5057

5158
## 0.1.5
5259

53-
- Implement `close` method #56
54-
- Implement `center` method #59
60+
* Implement `close` method #56
61+
* Implement `center` method #59
5562

5663
## 0.1.4
5764

58-
- [macos & windows] Implemented getOpacity & setOpacity methods #37 #45
59-
- [macos] Implement setProgressBar method #40
60-
- [windows] Fix `focus`, `blur` event not responding
61-
- [windows] Implement `focus` & `blur` methods
62-
- [macos & windows] Implement getTitleBarHeight methods #34
65+
* [macos & windows] Implemented getOpacity & setOpacity methods #37 #45
66+
* [macos] Implement setProgressBar method #40
67+
* [windows] Fix `focus`, `blur` event not responding
68+
* [windows] Implement `focus` & `blur` methods
69+
* [macos & windows] Implement getTitleBarHeight methods #34
6370

6471
## 0.1.3
6572

66-
- [windows] #31 Optimize setTitleBarStyle method.
73+
* [windows] #31 Optimize setTitleBarStyle method.
6774

6875
## 0.1.2
6976

70-
- [macos] Add setTitleBarStyle method.
71-
- [windows] Add setTitleBarStyle method (**Experiment**).
72-
- [windows] #24 Updated windows fullscreen handling.
73-
- [windows] #26 Make `maximize`, `unmaximize`, `minimize`, `restore` methods have native animation effects.
77+
* [macos] Add setTitleBarStyle method.
78+
* [windows] Add setTitleBarStyle method (**Experiment**).
79+
* [windows] #24 Updated windows fullscreen handling.
80+
* [windows] #26 Make `maximize`, `unmaximize`, `minimize`, `restore` methods have native animation effects.
7481

7582
## 0.1.1
7683

77-
- [macos] Fixed `setSize` coordinate error.
84+
* [macos] Fixed `setSize` coordinate error.
7885

7986
## 0.1.0
8087

81-
- Implemented `isResizable`, `setResizable` Methods.
82-
- Implemented `isClosable`, `setClosable` Methods.
83-
- Removed `terminate` Method.
84-
- [windows] Implemented `isMinimizable`, `setMinimizable` Methods.
88+
* Implemented `isResizable`, `setResizable` Methods.
89+
* Implemented `isClosable`, `setClosable` Methods.
90+
* Removed `terminate` Method.
91+
* [windows] Implemented `isMinimizable`, `setMinimizable` Methods.
8592

8693
## 0.0.5
8794

88-
- Implemented `setAsFrameless` Method.
89-
- Implemented `setSkipTaskbar` Method.
90-
- Implemented `focus`, `blur`, `maximize`, `unmaximize`, `minimize`, `restore`, `resize`, `move`, `enter-full-screen`, `leave-full-screen` Events.
91-
- [macos] Implemented `hiddenWindowAtLaunch` Method.
92-
- Fixed #10
95+
* Implemented `setAsFrameless` Method.
96+
* Implemented `setSkipTaskbar` Method.
97+
* Implemented `focus`, `blur`, `maximize`, `unmaximize`, `minimize`, `restore`, `resize`, `move`, `enter-full-screen`, `leave-full-screen` Events.
98+
* [macos] Implemented `hiddenWindowAtLaunch` Method.
99+
* Fixed #10
93100

94101
## 0.0.4
95102

96-
- Implemented `setCustomFrame`, `setBackgroundColor` Methods.
103+
* Implemented `setCustomFrame`, `setBackgroundColor` Methods.
97104

98105
## 0.0.3
99106

100-
- Implemented `isMinimized`, `minimize`, `restore` Methods.
101-
- Implemented `setMinimumSize`, `setMaximumSize` Methods.
102-
- [windows] [#4](https://github.com/leanflutter/window_manager/issues/4) Do not set `HWND_TOPMOST` flag in `setFullScreen`
107+
* Implemented `isMinimized`, `minimize`, `restore` Methods.
108+
* Implemented `setMinimumSize`, `setMaximumSize` Methods.
109+
* [windows] [#4](https://github.com/leanflutter/window_manager/issues/4) Do not set `HWND_TOPMOST` flag in `setFullScreen`
103110

104111
## 0.0.2
105112

106-
- Implemented `show`, `hide`, `isVisible` Methods.
107-
- Implemented `isMaximized`, `maximize`, `unmaximize` Methods.
108-
- Implemented `isFullScreen`, `setFullScreen` Methods.
109-
- Implemented `getBounds`, `setBounds` Methods.
110-
- Implemented `getPosition`, `setPosition` Methods.
111-
- Implemented `getSize`, `setSize` Methods.
112-
- Implemented `isAlwaysOnTop`, `setAlwaysOnTop` Methods.
113-
- Implemented `terminate` Method.
113+
* Implemented `show`, `hide`, `isVisible` Methods.
114+
* Implemented `isMaximized`, `maximize`, `unmaximize` Methods.
115+
* Implemented `isFullScreen`, `setFullScreen` Methods.
116+
* Implemented `getBounds`, `setBounds` Methods.
117+
* Implemented `getPosition`, `setPosition` Methods.
118+
* Implemented `getSize`, `setSize` Methods.
119+
* Implemented `isAlwaysOnTop`, `setAlwaysOnTop` Methods.
120+
* Implemented `terminate` Method.
114121

115122
## 0.0.1
116123

117-
- first release.
124+
* First release.

README-ZH.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[discord-image]: https://img.shields.io/discord/884679008049037342.svg
99
[discord-url]: https://discord.gg/zPa6EZ2jqb
1010

11-
这个插件允许 Flutter **桌面** 应用调整窗口的大小和位置
11+
这个插件允许 Flutter 桌面应用调整窗口的大小和位置
1212

1313
---
1414

@@ -35,6 +35,7 @@
3535
- [API](#api)
3636
- [WindowManager](#windowmanager)
3737
- [Methods](#methods)
38+
- [waitUntilReadyToShow](#waituntilreadytoshow)
3839
- [destroy `macos` `windows`](#destroy--macos--windows)
3940
- [close](#close)
4041
- [isPreventClose](#ispreventclose)
@@ -81,8 +82,10 @@
8182
- [setTitle](#settitle)
8283
- [setTitleBarStyle `macos` `windows`](#settitlebarstyle--macos--windows)
8384
- [getTitleBarHeight](#gettitlebarheight)
85+
- [isSkipTaskbar](#isskiptaskbar)
8486
- [setSkipTaskbar](#setskiptaskbar)
8587
- [setProgressBar `macos`](#setprogressbar--macos)
88+
- [setIcon `windows`](#seticon--windows)
8689
- [hasShadow `macos` `windows`](#hasshadow--macos--windows)
8790
- [setHasShadow `macos` `windows`](#sethasshadow--macos--windows)
8891
- [getOpacity `macos` `windows`](#getopacity--macos--windows)
@@ -149,14 +152,16 @@ void main() async {
149152
// 必须加上这一行。
150153
await windowManager.ensureInitialized();
151154

152-
// Use it only after calling `hiddenWindowAtLaunch`
153-
windowManager.waitUntilReadyToShow().then((_) async{
154-
// 隐藏窗口标题栏
155-
await windowManager.setTitleBarStyle(TitleBarStyle.hidden);
156-
await windowManager.setSize(Size(800, 600));
157-
await windowManager.center();
155+
WindowOptions windowOptions = WindowOptions(
156+
size: Size(800, 600),
157+
center: true,
158+
backgroundColor: Colors.transparent,
159+
skipTaskbar: false,
160+
titleBarStyle: TitleBarStyle.hidden,
161+
);
162+
windowManager.waitUntilReadyToShow(windowOptions, () async {
158163
await windowManager.show();
159-
await windowManager.setSkipTaskbar(false);
164+
await windowManager.focus();
160165
});
161166

162167
runApp(MyApp());
@@ -450,6 +455,10 @@ class _HomePageState extends State<HomePage> with WindowListener {
450455

451456
#### Methods
452457

458+
##### waitUntilReadyToShow
459+
460+
Wait until ready to show.
461+
453462
##### destroy `macos` `windows`
454463

455464
Force closing the window.
@@ -646,6 +655,10 @@ Changes the title bar style of native window.
646655

647656
Returns `int` - The title bar height of the native window.
648657

658+
##### isSkipTaskbar
659+
660+
Returns `bool` - Whether skipping taskbar is enabled.
661+
649662
##### setSkipTaskbar
650663

651664
Makes the window not show in the taskbar / dock.
@@ -655,6 +668,11 @@ Makes the window not show in the taskbar / dock.
655668
Sets progress value in progress bar. Valid range is [0, 1.0].
656669

657670

671+
##### setIcon `windows`
672+
673+
Sets window/taskbar icon.
674+
675+
658676
##### hasShadow `macos` `windows`
659677

660678
Returns `bool` - Whether the window has a shadow. On Windows, always returns true unless window is frameless.

README.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[discord-image]: https://img.shields.io/discord/884679008049037342.svg
99
[discord-url]: https://discord.gg/zPa6EZ2jqb
1010

11-
This plugin allows Flutter **desktop** apps to resizing and repositioning the window.
11+
This plugin allows Flutter desktop apps to resizing and repositioning the window.
1212

1313
---
1414

@@ -35,6 +35,7 @@ English | [简体中文](./README-ZH.md)
3535
- [API](#api)
3636
- [WindowManager](#windowmanager)
3737
- [Methods](#methods)
38+
- [waitUntilReadyToShow](#waituntilreadytoshow)
3839
- [destroy `macos` `windows`](#destroy--macos--windows)
3940
- [close](#close)
4041
- [isPreventClose](#ispreventclose)
@@ -81,8 +82,10 @@ English | [简体中文](./README-ZH.md)
8182
- [setTitle](#settitle)
8283
- [setTitleBarStyle `macos` `windows`](#settitlebarstyle--macos--windows)
8384
- [getTitleBarHeight](#gettitlebarheight)
85+
- [isSkipTaskbar](#isskiptaskbar)
8486
- [setSkipTaskbar](#setskiptaskbar)
8587
- [setProgressBar `macos`](#setprogressbar--macos)
88+
- [setIcon `windows`](#seticon--windows)
8689
- [hasShadow `macos` `windows`](#hasshadow--macos--windows)
8790
- [setHasShadow `macos` `windows`](#sethasshadow--macos--windows)
8891
- [getOpacity `macos` `windows`](#getopacity--macos--windows)
@@ -149,14 +152,16 @@ void main() async {
149152
// Must add this line.
150153
await windowManager.ensureInitialized();
151154

152-
// Use it only after calling `hiddenWindowAtLaunch`
153-
windowManager.waitUntilReadyToShow().then((_) async{
154-
// Hide window title bar
155-
await windowManager.setTitleBarStyle(TitleBarStyle.hidden);
156-
await windowManager.setSize(Size(800, 600));
157-
await windowManager.center();
155+
WindowOptions windowOptions = WindowOptions(
156+
size: Size(800, 600),
157+
center: true,
158+
backgroundColor: Colors.transparent,
159+
skipTaskbar: false,
160+
titleBarStyle: TitleBarStyle.hidden,
161+
);
162+
windowManager.waitUntilReadyToShow(windowOptions, () async {
158163
await windowManager.show();
159-
await windowManager.setSkipTaskbar(false);
164+
await windowManager.focus();
160165
});
161166

162167
runApp(MyApp());
@@ -450,6 +455,10 @@ class _HomePageState extends State<HomePage> with WindowListener {
450455

451456
#### Methods
452457

458+
##### waitUntilReadyToShow
459+
460+
Wait until ready to show.
461+
453462
##### destroy `macos` `windows`
454463

455464
Force closing the window.
@@ -646,6 +655,10 @@ Changes the title bar style of native window.
646655

647656
Returns `int` - The title bar height of the native window.
648657

658+
##### isSkipTaskbar
659+
660+
Returns `bool` - Whether skipping taskbar is enabled.
661+
649662
##### setSkipTaskbar
650663

651664
Makes the window not show in the taskbar / dock.
@@ -655,6 +668,11 @@ Makes the window not show in the taskbar / dock.
655668
Sets progress value in progress bar. Valid range is [0, 1.0].
656669

657670

671+
##### setIcon `windows`
672+
673+
Sets window/taskbar icon.
674+
675+
658676
##### hasShadow `macos` `windows`
659677

660678
Returns `bool` - Whether the window has a shadow. On Windows, always returns true unless window is frameless.

example/macos/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PODS:
22
- FlutterMacOS (1.0.0)
33
- tray_manager (0.0.1):
44
- FlutterMacOS
5-
- window_manager (0.1.4):
5+
- window_manager (0.2.0):
66
- FlutterMacOS
77

88
DEPENDENCIES:
@@ -21,7 +21,7 @@ EXTERNAL SOURCES:
2121
SPEC CHECKSUMS:
2222
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
2323
tray_manager: 9064e219c56d75c476e46b9a21182087930baf90
24-
window_manager: 02776e5a599084cd4576e27a42dd5ec6f49132cf
24+
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
2525

2626
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
2727

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.2.1"
200+
version: "0.2.2"
201201
sdks:
202202
dart: ">=2.14.0 <3.0.0"
203203
flutter: ">=1.20.0"

0 commit comments

Comments
 (0)