|
1 | 1 | # window_manager
|
2 | 2 |
|
3 |
| -[![pub version][pub-image]][pub-url] [![][discord-image]][discord-url] ![][visits-count-image] [![All Contributors][all-contributors-image]](#contributors) |
| 3 | +[![pub version][pub-image]][pub-url] [![][discord-image]][discord-url] [![All Contributors][all-contributors-image]](#contributors) |
4 | 4 |
|
5 | 5 | [pub-image]: https://img.shields.io/pub/v/window_manager.svg
|
6 | 6 | [pub-url]: https://pub.dev/packages/window_manager
|
7 | 7 |
|
8 | 8 | [discord-image]: https://img.shields.io/discord/884679008049037342.svg
|
9 | 9 | [discord-url]: https://discord.gg/zPa6EZ2jqb
|
10 | 10 |
|
11 |
| -[visits-count-image]: https://img.shields.io/badge/dynamic/json?label=Visits%20Count&query=value&url=https://api.countapi.xyz/hit/leanflutter.window_manager/visits |
12 | 11 | [all-contributors-image]: https://img.shields.io/github/all-contributors/leanflutter/window_manager?color=ee8449&style=flat-square
|
13 | 12 |
|
14 | 13 | 这个插件允许 Flutter 桌面应用调整窗口的大小和位置。
|
|
58 | 57 | - [restore](#restore)
|
59 | 58 | - [isFullScreen](#isfullscreen)
|
60 | 59 | - [setFullScreen](#setfullscreen)
|
| 60 | + - [isDockable `windows`](#isdockable--windows) |
| 61 | + - [isDocked `windows`](#isdocked--windows) |
| 62 | + - [dock `windows`](#dock--windows) |
| 63 | + - [undock `windows`](#undock--windows) |
61 | 64 | - [setAspectRatio](#setaspectratio)
|
62 | 65 | - [setBackgroundColor](#setbackgroundcolor)
|
63 | 66 | - [setAlignment](#setalignment)
|
|
77 | 80 | - [isMinimizable `macos` `windows`](#isminimizable--macos--windows)
|
78 | 81 | - [setMinimizable `macos` `windows`](#setminimizable--macos--windows)
|
79 | 82 | - [isClosable `windows`](#isclosable--windows)
|
80 |
| - - [isMaximizable `macos` `windows`](#ismaximizable--macos--windows) |
| 83 | + - [isMaximizable `macos` `windows`](#ismaximizable--macos--windows) |
81 | 84 | - [setMaximizable](#setmaximizable)
|
82 | 85 | - [setClosable `macos` `windows`](#setclosable--macos--windows)
|
83 | 86 | - [isAlwaysOnTop](#isalwaysontop)
|
84 | 87 | - [setAlwaysOnTop](#setalwaysontop)
|
85 | 88 | - [isAlwaysOnBottom](#isalwaysonbottom)
|
86 |
| - - [setAlwaysOnBottom `linux` `windows`](#setalwaysonbottom--linux--windows) |
| 89 | + - [setAlwaysOnBottom `linux` `windows`](#setalwaysonbottom--linux--windows) |
87 | 90 | - [getTitle](#gettitle)
|
88 | 91 | - [setTitle](#settitle)
|
89 | 92 | - [setTitleBarStyle](#settitlebarstyle)
|
|
92 | 95 | - [setSkipTaskbar](#setskiptaskbar)
|
93 | 96 | - [setProgressBar `macos` `windows`](#setprogressbar--macos--windows)
|
94 | 97 | - [setIcon `windows`](#seticon--windows)
|
| 98 | + - [isVisibleOnAllWorkspaces `macos`](#isvisibleonallworkspaces--macos) |
| 99 | + - [setVisibleOnAllWorkspaces `macos`](#setvisibleonallworkspaces--macos) |
| 100 | + - [setBadgeLabel `macos`](#setbadgelabel--macos) |
95 | 101 | - [hasShadow `macos` `windows`](#hasshadow--macos--windows)
|
96 | 102 | - [setHasShadow `macos` `windows`](#sethasshadow--macos--windows)
|
97 | 103 | - [getOpacity](#getopacity)
|
|
117 | 123 | - [onWindowMoved `macos` `windows`](#onwindowmoved--macos--windows)
|
118 | 124 | - [onWindowEnterFullScreen](#onwindowenterfullscreen)
|
119 | 125 | - [onWindowLeaveFullScreen](#onwindowleavefullscreen)
|
| 126 | + - [onWindowDocked `windows`](#onwindowdocked--windows) |
| 127 | + - [onWindowUndocked `windows`](#onwindowundocked--windows) |
120 | 128 | - [onWindowEvent](#onwindowevent)
|
| 129 | +- [贡献者](#%E8%B4%A1%E7%8C%AE%E8%80%85) |
121 | 130 | - [许可证](#%E8%AE%B8%E5%8F%AF%E8%AF%81)
|
122 | 131 |
|
123 | 132 | <!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
@@ -467,8 +476,8 @@ class HomePage extends StatefulWidget {
|
467 | 476 | class _HomePageState extends State<HomePage> with WindowListener {
|
468 | 477 | @override
|
469 | 478 | void initState() {
|
470 |
| - windowManager.addListener(this); |
471 | 479 | super.initState();
|
| 480 | + windowManager.addListener(this); |
472 | 481 | }
|
473 | 482 |
|
474 | 483 | @override
|
@@ -593,6 +602,26 @@ Returns `bool` - Whether the window is in fullscreen mode.
|
593 | 602 |
|
594 | 603 | Sets whether the window should be in fullscreen mode.
|
595 | 604 |
|
| 605 | +##### isDockable `windows` |
| 606 | + |
| 607 | +Returns `bool` - Whether the window is dockable or not. |
| 608 | + |
| 609 | + |
| 610 | +##### isDocked `windows` |
| 611 | + |
| 612 | +Returns `bool` - Whether the window is docked. |
| 613 | + |
| 614 | + |
| 615 | +##### dock `windows` |
| 616 | + |
| 617 | +Docks the window. only works on Windows |
| 618 | + |
| 619 | + |
| 620 | +##### undock `windows` |
| 621 | + |
| 622 | +Undocks the window. only works on Windows |
| 623 | + |
| 624 | + |
596 | 625 | ##### setAspectRatio
|
597 | 626 |
|
598 | 627 | This will make a window maintain an aspect ratio.
|
@@ -674,7 +703,7 @@ Sets whether the window can be manually minimized by user.
|
674 | 703 | Returns `bool` - Whether the window can be manually closed by user.
|
675 | 704 |
|
676 | 705 |
|
677 |
| -##### isMaximizable `windows` |
| 706 | +##### isMaximizable `macos` `windows` |
678 | 707 |
|
679 | 708 | Returns `bool` - Whether the window can be manually maximized by the user.
|
680 | 709 |
|
@@ -870,6 +899,16 @@ Emitted when the window enters a full-screen state.
|
870 | 899 |
|
871 | 900 | Emitted when the window leaves a full-screen state.
|
872 | 901 |
|
| 902 | +##### onWindowDocked `windows` |
| 903 | + |
| 904 | +Emitted when the window entered a docked state. |
| 905 | + |
| 906 | + |
| 907 | +##### onWindowUndocked `windows` |
| 908 | + |
| 909 | +Emitted when the window leaves a docked state. |
| 910 | + |
| 911 | + |
873 | 912 | ##### onWindowEvent
|
874 | 913 |
|
875 | 914 | Emitted all events.
|
|
0 commit comments