[英]Flutter desktop windows notification badge on app icon
You can use package:windows_taskbar
to add badge (overlay icon) to your Flutter Windows app's taskbar icon.您可以使用
package:windows_taskbar
将徽章(覆盖图标)添加到 Flutter Windows 应用程序的任务栏图标。
You have to create icons yourself though, maybe "1", "2", "3"... "9" & "9+" like most applications (as .ico
files).不过,您必须自己创建图标,可能像大多数应用程序(如
.ico
文件)一样,可能是“1”、“2”、“3”...“9”和“9+”。
It's very easy to use as well.它也很容易使用。
dependencies:
windows_taskbar: ^1.1.0
WindowsTaskbar.setOverlayIcon(
ThumbnailToolbarAssetIcon('assets/red_slash.ico'),
tooltip: 'Stop',
);
Don't forget to add the icon file to your pubspec.yaml
assets.不要忘记将图标文件添加到您的
pubspec.yaml
资产中。
WindowsTaskbar.resetOverlayIcon();
NOTE : I'm developer of the package.注意:我是 package 的开发人员。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.