Skip to content

Commit 641bbad

Browse files
committed
v0.2.0
1 parent 0816f5e commit 641bbad

7 files changed

Lines changed: 31 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.0
2+
3+
* [macos] Implemented ` setIconPosition` method. (#25)
4+
15
## 0.1.8
26

37
* [windows] getBounds method returns null when not initialized

README-ZH.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
```yaml
5858
dependencies:
59-
tray_manager: ^0.1.8
59+
tray_manager: ^0.2.0
6060
```
6161
6262
@@ -185,6 +185,7 @@ class _HomePageState extends State<HomePage> with TrayListener {
185185
| ---------------- | -------------------------------- | ----- | ----- | ------- |
186186
| destroy | 立即销毁托盘图标 | ✔️ | ✔️ | ✔️ |
187187
| setIcon | 设置与此托盘图标相关的图片。 | ✔️ | ✔️ | ✔️ |
188+
| setIconPosition | 设置托盘图标的图标位置。 || ✔️ ||
188189
| setToolTip | 设置此托盘图标的悬停文本。 || ✔️ | ✔️ |
189190
| setContextMenu | 设置此图标的上下文菜单。 | ✔️ | ✔️ | ✔️ |
190191
| popUpContextMenu | 弹出托盘图标的上下文菜单。 || ✔️ | ✔️ |

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Add this to your package's pubspec.yaml file:
5656

5757
```yaml
5858
dependencies:
59-
tray_manager: ^0.1.8
59+
tray_manager: ^0.2.0
6060
```
6161
6262
Or
@@ -185,6 +185,7 @@ class _HomePageState extends State<HomePage> with TrayListener {
185185
| ---------------- | ---------------------------------------------- | ----- | ----- | ------- |
186186
| destroy | Destroys the tray icon immediately. | ✔️ | ✔️ | ✔️ |
187187
| setIcon | Sets the image associated with this tray icon. | ✔️ | ✔️ | ✔️ |
188+
| setIconPosition | Sets the icon position of the tray icon. || ✔️ ||
188189
| setToolTip | Sets the hover text for this tray icon. || ✔️ | ✔️ |
189190
| setContextMenu | Sets the context menu for this icon. | ✔️ | ✔️ | ✔️ |
190191
| popUpContextMenu | Pops up the context menu of the tray icon. || ✔️ | ✔️ |

example/lib/pages/home.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,26 @@ class _HomePageState extends State<HomePage> with TrayListener {
9999
),
100100
onTap: () => _handleSetIcon(_kIconTypeDefault),
101101
),
102+
PreferenceListItem(
103+
title: Text('setIconPosition'),
104+
accessoryView: Row(
105+
children: [
106+
CupertinoButton(
107+
child: Text('left'),
108+
onPressed: () {
109+
trayManager.setIconPosition(TrayIconPositon.left);
110+
},
111+
),
112+
CupertinoButton(
113+
child: Text('right'),
114+
onPressed: () {
115+
trayManager.setIconPosition(TrayIconPositon.right);
116+
},
117+
),
118+
],
119+
),
120+
onTap: () => _handleSetIcon(_kIconTypeDefault),
121+
),
102122
PreferenceListItem(
103123
title: Text('setToolTip'),
104124
onTap: () async {

example/macos/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ SPEC CHECKSUMS:
1919

2020
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
2121

22-
COCOAPODS: 1.11.2
22+
COCOAPODS: 1.11.3

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ packages:
176176
path: ".."
177177
relative: true
178178
source: path
179-
version: "0.1.8"
179+
version: "0.2.0"
180180
vector_math:
181181
dependency: transitive
182182
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: tray_manager
22
description: This plugin allows Flutter desktop apps to defines system tray.
3-
version: 0.1.8
3+
version: 0.2.0
44
homepage: https://github.com/leanflutter/tray_manager
55

66
platforms:

0 commit comments

Comments
 (0)