Skip to content

Commit f94b618

Browse files
committed
Add Swift Package Manager support
1 parent bc893bf commit f94b618

File tree

30 files changed

+394
-86
lines changed

30 files changed

+394
-86
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: subosito/flutter-action@v2
1515
with:
16-
flutter-version: "3.24.3"
16+
flutter-version: "3.32.0"
1717
channel: "stable"
1818
- run: |
1919
sudo apt-get update
@@ -30,7 +30,7 @@ jobs:
3030
- uses: actions/checkout@v3
3131
- uses: subosito/flutter-action@v2
3232
with:
33-
flutter-version: "3.24.3"
33+
flutter-version: "3.32.0"
3434
channel: "stable"
3535
- uses: bluefireteam/melos-action@v3
3636
- working-directory: ./packages/window_manager/example
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/checkout@v3
4444
- uses: subosito/flutter-action@v2
4545
with:
46-
flutter-version: "3.24.3"
46+
flutter-version: "3.32.0"
4747
channel: "stable"
4848
- uses: bluefireteam/melos-action@v3
4949
- working-directory: ./packages/window_manager/example
@@ -56,7 +56,7 @@ jobs:
5656
- uses: actions/checkout@v3
5757
- uses: subosito/flutter-action@v2
5858
with:
59-
flutter-version: "3.24.3"
59+
flutter-version: "3.32.0"
6060
channel: "stable"
6161
- uses: bluefireteam/melos-action@v3
6262
- working-directory: ./packages/window_manager/example

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: subosito/flutter-action@v2
1515
with:
16-
flutter-version: "3.24.3"
16+
flutter-version: "3.32.0"
1717
channel: "stable"
1818
- uses: bluefireteam/melos-action@v3
1919
- run: melos run analyze
@@ -24,7 +24,7 @@ jobs:
2424
- uses: actions/checkout@v3
2525
- uses: subosito/flutter-action@v2
2626
with:
27-
flutter-version: "3.24.3"
27+
flutter-version: "3.32.0"
2828
channel: "stable"
2929
cache: true
3030
- uses: bluefireteam/melos-action@v3

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: subosito/flutter-action@v2
1515
with:
1616
channel: stable
17-
flutter-version: "3.24.3"
17+
flutter-version: "3.32.0"
1818
- run: |
1919
sudo apt-get update -y
2020
sudo apt-get install -y ninja-build libgtk-3-dev ayatana-appindicator3-0.1 xvfb
@@ -28,7 +28,7 @@ jobs:
2828
- uses: subosito/flutter-action@v2
2929
with:
3030
channel: stable
31-
flutter-version: "3.24.3"
31+
flutter-version: "3.32.0"
3232
- uses: bluefireteam/melos-action@v3
3333
# Blocked by https://github.com/flutter/flutter/issues/118469
3434
# - working-directory: ./packages/window_manager/example
@@ -40,7 +40,7 @@ jobs:
4040
- uses: subosito/flutter-action@v2
4141
with:
4242
channel: stable
43-
flutter-version: "3.24.3"
43+
flutter-version: "3.32.0"
4444
- uses: bluefireteam/melos-action@v3
4545
- working-directory: ./packages/window_manager/example
4646
run: flutter test integration_test -v

README-ZH.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
33
# window_manager
44

5-
[![pub version][pub-image]][pub-url] [![][discord-image]][discord-url] [![All Contributors][all-contributors-image]](#contributors)
5+
[![pub version][pub-image]][pub-url] [![Pub Monthly Downloads][pub-dm-image]][pub-dm-url] [![][discord-image]][discord-url] [![All Contributors][all-contributors-image]](#contributors)
66

77
[pub-image]: https://img.shields.io/pub/v/window_manager.svg
88
[pub-url]: https://pub.dev/packages/window_manager
9-
9+
[pub-dm-image]: https://img.shields.io/pub/dm/window_manager.svg
10+
[pub-dm-url]: https://pub.dev/packages/window_manager/score
1011
[discord-image]: https://img.shields.io/discord/884679008049037342.svg
1112
[discord-url]: https://discord.gg/zPa6EZ2jqb
12-
1313
[all-contributors-image]: https://img.shields.io/github/all-contributors/leanflutter/window_manager?color=ee8449&style=flat-square
1414

1515
这个插件为 Flutter 桌面应用程序提供了全面的窗口管理功能,使开发者能够完全控制窗口大小、位置、外观、关闭行为,以及监听事件。
@@ -41,7 +41,7 @@
4141

4242
| Linux | macOS | Windows |
4343
| :---: | :---: | :-----: |
44-
| ✔️ | ✔️ | ✔️ |
44+
| ✔️ | ✔️ | ✔️ |
4545

4646
## 文档
4747

@@ -57,7 +57,7 @@
5757

5858
```yaml
5959
dependencies:
60-
window_manager: ^0.4.2
60+
window_manager: ^0.5.0
6161
```
6262
6363
### 用法
@@ -92,13 +92,13 @@ void main() async {
9292
9393
## 相关文章
9494

95-
- [关闭窗口后点击Dock图标进行恢复](https://leanflutter.dev/zh/blog/click-dock-icon-to-restore-after-closing-the-window)
95+
- [关闭窗口后点击 Dock 图标进行恢复](https://leanflutter.dev/zh/blog/click-dock-icon-to-restore-after-closing-the-window)
9696
- [让应用成为单实例](https://leanflutter.dev/zh/blog/making-the-app-single-instanced)
9797

9898
## 谁在用使用它?
9999

100-
- [Airclap](https://airclap.app/) - 任何文件,任意设备,随意发送。简单好用的跨平台高速文件传输APP
101-
- [AuthPass](https://authpass.app/) - 基于Flutter的密码管理器,适用于所有平台。兼容Keepass 2.x(kdbx 3.x)。
100+
- [Airclap](https://airclap.app/) - 任何文件,任意设备,随意发送。简单好用的跨平台高速文件传输 APP
101+
- [AuthPass](https://authpass.app/) - 基于 Flutter 的密码管理器,适用于所有平台。兼容 Keepass 2.x(kdbx 3.x)。
102102
- [Biyi (比译)](https://biyidev.com/) - 一个便捷的翻译和词典应用程序。
103103
- [BlueBubbles](https://github.com/BlueBubblesApp/bluebubbles-app) - BlueBubbles is an ecosystem of apps bringing iMessage to Android, Windows, and Linux
104104
- [LunaSea](https://github.com/CometTools/LunaSea) - A self-hosted controller for mobile and macOS built using the Flutter framework.
@@ -108,7 +108,6 @@ void main() async {
108108
- [UniControlHub](https://github.com/rohitsangwan01/uni_control_hub) - Seamlessly bridge your Desktop and Mobile devices
109109
- [EyesCare](https://bixat.dev/products/EyesCare) - A light-weight application following 20 rule adherence for optimum eye health
110110

111-
112111
## 贡献者
113112

114113
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
33
# window_manager
44

5-
[![pub version][pub-image]][pub-url] [![][discord-image]][discord-url] [![All Contributors][all-contributors-image]](#contributors)
5+
[![pub version][pub-image]][pub-url] [![Pub Monthly Downloads][pub-dm-image]][pub-dm-url] [![][discord-image]][discord-url] [![All Contributors][all-contributors-image]](#contributors)
66

77
[pub-image]: https://img.shields.io/pub/v/window_manager.svg
88
[pub-url]: https://pub.dev/packages/window_manager
9-
9+
[pub-dm-image]: https://img.shields.io/pub/dm/window_manager.svg
10+
[pub-dm-url]: https://pub.dev/packages/window_manager/score
1011
[discord-image]: https://img.shields.io/discord/884679008049037342.svg
1112
[discord-url]: https://discord.gg/zPa6EZ2jqb
12-
1313
[all-contributors-image]: https://img.shields.io/github/all-contributors/leanflutter/window_manager?color=ee8449&style=flat-square
1414

1515
This plugin provides comprehensive window management capabilities for Flutter desktop applications, enabling full control over window size, position, appearance, close behavior, and listening to events.
@@ -41,7 +41,7 @@ English | [简体中文](./README-ZH.md)
4141

4242
| Linux | macOS | Windows |
4343
| :---: | :---: | :-----: |
44-
| ✔️ | ✔️ | ✔️ |
44+
| ✔️ | ✔️ | ✔️ |
4545

4646
## Documentation
4747

@@ -57,7 +57,7 @@ Add this to your package's `pubspec.yaml` file:
5757

5858
```yaml
5959
dependencies:
60-
window_manager: ^0.4.2
60+
window_manager: ^0.5.0
6161
```
6262
6363
### Usage
@@ -103,12 +103,11 @@ void main() async {
103103
- [BlueBubbles](https://github.com/BlueBubblesApp/bluebubbles-app) - BlueBubbles is an ecosystem of apps bringing iMessage to Android, Windows, and Linux
104104
- [LunaSea](https://github.com/CometTools/LunaSea) - A self-hosted controller for mobile and macOS built using the Flutter framework.
105105
- [Linwood Butterfly](https://github.com/LinwoodCloud/Butterfly) - Open source note taking app written in Flutter
106-
- [RustDesk](https://github.com/rustdesk/rustdesk) - Yet another remote desktop software, written in Rust. Works out of the box, no configuration required.
106+
- [RustDesk](https://github.com/rustdesk/rustdesk) - Yet another remote desktop software, written in Rust. Works out of the box, no configuration required.
107107
- [Ubuntu Desktop Installer](https://github.com/canonical/ubuntu-desktop-installer) - This project is a modern implementation of the Ubuntu Desktop installer.
108108
- [UniControlHub](https://github.com/rohitsangwan01/uni_control_hub) - Seamlessly bridge your Desktop and Mobile devices
109109
- [EyesCare](https://bixat.dev/products/EyesCare) - A light-weight application following 20 rule adherence for optimum eye health
110110

111-
112111
## Contributors
113112

114113
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->

packages/window_manager/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related
@@ -26,5 +28,6 @@ migrate_working_dir/
2628
/pubspec.lock
2729
**/doc/api/
2830
.dart_tool/
29-
.packages
31+
.flutter-plugins
32+
.flutter-plugins-dependencies
3033
build/

packages/window_manager/example/.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
1114

1215
# IntelliJ related
1316
*.iml
@@ -26,14 +29,10 @@
2629
.dart_tool/
2730
.flutter-plugins
2831
.flutter-plugins-dependencies
29-
.packages
3032
.pub-cache/
3133
.pub/
3234
/build/
3335

34-
# Web related
35-
lib/generated_plugin_registrant.dart
36-
3736
# Symbolication related
3837
app.*.symbols
3938

packages/window_manager/example/macos/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
**/Pods/
44

55
# Xcode-related
6+
**/dgph
67
**/xcuserdata/

packages/window_manager/example/macos/Podfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ target 'Runner' do
3131
use_modular_headers!
3232

3333
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34+
target 'RunnerTests' do
35+
inherit! :search_paths
36+
end
3437
end
3538

3639
post_install do |installer|

packages/window_manager/example/macos/Podfile.lock

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ PODS:
44
- FlutterMacOS
55
- tray_manager (0.0.1):
66
- FlutterMacOS
7-
- window_manager (0.2.0):
8-
- FlutterMacOS
97

108
DEPENDENCIES:
119
- FlutterMacOS (from `Flutter/ephemeral`)
1210
- screen_retriever_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos`)
1311
- tray_manager (from `Flutter/ephemeral/.symlinks/plugins/tray_manager/macos`)
14-
- window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`)
1512

1613
EXTERNAL SOURCES:
1714
FlutterMacOS:
@@ -20,15 +17,12 @@ EXTERNAL SOURCES:
2017
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever_macos/macos
2118
tray_manager:
2219
:path: Flutter/ephemeral/.symlinks/plugins/tray_manager/macos
23-
window_manager:
24-
:path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos
2520

2621
SPEC CHECKSUMS:
2722
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
28-
screen_retriever_macos: 776e0fa5d42c6163d2bf772d22478df4b302b161
29-
tray_manager: 9064e219c56d75c476e46b9a21182087930baf90
30-
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
23+
screen_retriever_macos: 452e51764a9e1cdb74b3c541238795849f21557f
24+
tray_manager: a104b5c81b578d83f3c3d0f40a997c8b10810166
3125

32-
PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7
26+
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
3327

34-
COCOAPODS: 1.14.3
28+
COCOAPODS: 1.16.2

0 commit comments

Comments
 (0)