[英]Flutter desktop windows notification badge on app icon
這些徽章是在通知時自動創建的。 windows 中的通知包不多。 你可以試試這個。
快速通知:^0.2.1
QuickNotify.notify(
title: 'My title',
content: 'My content',
);
您可以使用package:windows_taskbar
將徽章(覆蓋圖標)添加到 Flutter Windows 應用程序的任務欄圖標。
不過,您必須自己創建圖標,可能像大多數應用程序(如.ico
文件)一樣,可能是“1”、“2”、“3”...“9”和“9+”。
它也很容易使用。
dependencies:
windows_taskbar: ^1.1.0
WindowsTaskbar.setOverlayIcon(
ThumbnailToolbarAssetIcon('assets/red_slash.ico'),
tooltip: 'Stop',
);
不要忘記將圖標文件添加到您的pubspec.yaml
資產中。
WindowsTaskbar.resetOverlayIcon();
注意:我是 package 的開發人員。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.