File tree Expand file tree Collapse file tree 6 files changed +28
-7
lines changed
Expand file tree Collapse file tree 6 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 1+ ## 0.1.5
2+
3+ - Implement ` close ` method #56
4+ - Implement ` center ` method #59
5+
16## 0.1.4
27
38- [ macos & windows] Implemented getOpacity & setOpacity methods #37 #45
Original file line number Diff line number Diff line change 3535 - [ API] ( #api )
3636 - [ WindowManager] ( #windowmanager )
3737 - [ Methods] ( #methods )
38+ - [ close] ( #close )
3839 - [ focus] ( #focus )
3940 - [ blur ` macos ` ` windows ` ] ( #blur--macos--windows )
4041 - [ show] ( #show )
5253 - [ getBounds] ( #getbounds )
5354 - [ setBounds] ( #setbounds )
5455 - [ getPosition] ( #getposition )
56+ - [ center] ( #center )
5557 - [ setPosition] ( #setposition )
5658 - [ getSize] ( #getsize )
5759 - [ setSize] ( #setsize )
109111
110112``` yaml
111113dependencies :
112- window_manager : ^0.1.4
114+ window_manager : ^0.1.5
113115` ` `
114116
115117或
@@ -138,7 +140,7 @@ void main() async {
138140 // 隐藏窗口标题栏
139141 await windowManager.setTitleBarStyle('hidden');
140142 await windowManager.setSize(Size(800, 600));
141- await windowManager.setPosition(Offset.zero );
143+ await windowManager.center( );
142144 await windowManager.show();
143145 await windowManager.setSkipTaskbar(false);
144146 });
@@ -378,6 +380,10 @@ class _HomePageState extends State<HomePage> with WindowListener {
378380
379381#### Methods
380382
383+ ##### close
384+
385+ Try to close the window.
386+
381387##### focus
382388
383389Focuses on the window.
@@ -447,6 +453,10 @@ Resizes and moves the window to the supplied bounds.
447453
448454Returns ` Offset ` - Contains the window's current position.
449455
456+ ##### center
457+
458+ Moves window to the center of the screen.
459+
450460##### setPosition
451461
452462Moves window to position.
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ English | [简体中文](./README-ZH.md)
3535 - [ API] ( #api )
3636 - [ WindowManager] ( #windowmanager )
3737 - [ Methods] ( #methods )
38+ - [ close] ( #close )
3839 - [ focus] ( #focus )
3940 - [ blur ` macos ` ` windows ` ] ( #blur--macos--windows )
4041 - [ show] ( #show )
@@ -52,6 +53,7 @@ English | [简体中文](./README-ZH.md)
5253 - [ getBounds] ( #getbounds )
5354 - [ setBounds] ( #setbounds )
5455 - [ getPosition] ( #getposition )
56+ - [ center] ( #center )
5557 - [ setPosition] ( #setposition )
5658 - [ getSize] ( #getsize )
5759 - [ setSize] ( #setsize )
@@ -109,7 +111,7 @@ Add this to your package's `pubspec.yaml` file:
109111
110112``` yaml
111113dependencies :
112- window_manager : ^0.1.4
114+ window_manager : ^0.1.5
113115` ` `
114116
115117Or
@@ -138,7 +140,7 @@ void main() async {
138140 // Hide window title bar
139141 await windowManager.setTitleBarStyle('hidden');
140142 await windowManager.setSize(Size(800, 600));
141- await windowManager.setPosition(Offset.zero );
143+ await windowManager.center( );
142144 await windowManager.show();
143145 await windowManager.setSkipTaskbar(false);
144146 });
@@ -451,6 +453,10 @@ Resizes and moves the window to the supplied bounds.
451453
452454Returns ` Offset ` - Contains the window's current position.
453455
456+ ##### center
457+
458+ Moves window to the center of the screen.
459+
454460##### setPosition
455461
456462Moves window to position.
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ packages:
169169 path: ".."
170170 relative: true
171171 source: path
172- version: "0.1.4 "
172+ version: "0.1.5 "
173173sdks:
174174 dart: ">=2.14.0 <3.0.0"
175175 flutter: ">=1.20.0"
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ class WindowManager {
204204 return Offset (resultData['x' ], resultData['y' ]);
205205 }
206206
207- // Moves window to the center of the screen.
207+ /// Moves window to the center of the screen.
208208 Future <void > center () async {
209209 Size windowSize = await getSize ();
210210 Map <String , dynamic > primaryDisplay = await _getPrimaryDisplay ();
Original file line number Diff line number Diff line change 11name : window_manager
22description : This plugin allows Flutter desktop apps to resizing and repositioning the window.
3- version : 0.1.4
3+ version : 0.1.5
44homepage : https://github.com/leanflutter/window_manager
55
66environment :
You can’t perform that action at this time.
0 commit comments