diff --git a/CHANGELOG.md b/CHANGELOG.md index 896ab6d..6b10609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0 + +* [macos] Implemented ` setIconPosition` method. (#25) + ## 0.1.8 * [windows] getBounds method returns null when not initialized diff --git a/README-ZH.md b/README-ZH.md index 7abf277..85c5067 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -56,7 +56,7 @@ ```yaml dependencies: - tray_manager: ^0.1.8 + tray_manager: ^0.2.0 ``` 或 @@ -185,6 +185,7 @@ class _HomePageState extends State with TrayListener { | ---------------- | -------------------------------- | ----- | ----- | ------- | | destroy | 立即销毁托盘图标 | ✔️ | ✔️ | ✔️ | | setIcon | 设置与此托盘图标相关的图片。 | ✔️ | ✔️ | ✔️ | +| setIconPosition | 设置托盘图标的图标位置。 | ➖ | ✔️ | ➖ | | setToolTip | 设置此托盘图标的悬停文本。 | ➖ | ✔️ | ✔️ | | setContextMenu | 设置此图标的上下文菜单。 | ✔️ | ✔️ | ✔️ | | popUpContextMenu | 弹出托盘图标的上下文菜单。 | ➖ | ✔️ | ✔️ | diff --git a/README.md b/README.md index d70610f..b02b3b1 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Add this to your package's pubspec.yaml file: ```yaml dependencies: - tray_manager: ^0.1.8 + tray_manager: ^0.2.0 ``` Or @@ -185,6 +185,7 @@ class _HomePageState extends State with TrayListener { | ---------------- | ---------------------------------------------- | ----- | ----- | ------- | | destroy | Destroys the tray icon immediately. | ✔️ | ✔️ | ✔️ | | setIcon | Sets the image associated with this tray icon. | ✔️ | ✔️ | ✔️ | +| setIconPosition | Sets the icon position of the tray icon. | ➖ | ✔️ | ➖ | | setToolTip | Sets the hover text for this tray icon. | ➖ | ✔️ | ✔️ | | setContextMenu | Sets the context menu for this icon. | ✔️ | ✔️ | ✔️ | | popUpContextMenu | Pops up the context menu of the tray icon. | ➖ | ✔️ | ✔️ | diff --git a/example/lib/pages/home.dart b/example/lib/pages/home.dart index d0f5a9e..c0a9f65 100644 --- a/example/lib/pages/home.dart +++ b/example/lib/pages/home.dart @@ -99,6 +99,26 @@ class _HomePageState extends State with TrayListener { ), onTap: () => _handleSetIcon(_kIconTypeDefault), ), + PreferenceListItem( + title: Text('setIconPosition'), + accessoryView: Row( + children: [ + CupertinoButton( + child: Text('left'), + onPressed: () { + trayManager.setIconPosition(TrayIconPositon.left); + }, + ), + CupertinoButton( + child: Text('right'), + onPressed: () { + trayManager.setIconPosition(TrayIconPositon.right); + }, + ), + ], + ), + onTap: () => _handleSetIcon(_kIconTypeDefault), + ), PreferenceListItem( title: Text('setToolTip'), onTap: () async { diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock index 9a7eeef..19f83a6 100644 --- a/example/macos/Podfile.lock +++ b/example/macos/Podfile.lock @@ -19,4 +19,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/example/pubspec.lock b/example/pubspec.lock index 88c00cd..7ae04e4 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -176,7 +176,7 @@ packages: path: ".." relative: true source: path - version: "0.1.8" + version: "0.2.0" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 867a40a..c33284f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: tray_manager description: This plugin allows Flutter desktop apps to defines system tray. -version: 0.1.8 +version: 0.2.0 homepage: https://github.com/leanflutter/tray_manager platforms: