Aus öffentlichen Paketdaten erstellte Orientierung.
Das windows_notification-Paket ermöglicht Flutter-Anwendungen unter Windows, Systembenachrichtigungen mit anpassbaren Vorlagen zu senden. Es integriert sich in die Windows-Benachrichtigungs-API und ermöglicht Entwicklern die Anzeige von Toast-Benachrichtigungen mit Titeln, Nachrichten und reichhaltigen Inhalten wie Bildern und Schaltflächen. Dieses Paket ist ideal für Desktop-Anwendungen, die zeitnahe Benutzerwarnungen oder Statusaktualisierungen erfordern. Es unterstützt sowohl einfache als auch erweiterte Benachrichtigungslayouts und eignet sich daher für Produktivitäts-Tools, Messaging-Apps und Hintergrunddienste. Das Paket ist leichtgewichtig und speziell für Windows-Plattformen entwickelt.
Anwendungsfälle
App-Warnungen senden
Systembenachrichtigungen anzeigen
Benutzeraktivitäts-Erinnerungen
Hintergrund-Aufgabenbenachrichtigungen
Echtzeit-Update-Anzeige
Hauptmerkmale
Anpassbare Benachrichtigungsvorlagen
Unterstützung für reichhaltigen Inhalt wie Bilder
Integration mit der Windows-Benachrichtigungs-API
Einfaches und intuitives API
Plattformspezifisch für Windows
Geeignet für
Windows-Desktop-Anwendungen
Produktivitäts-Tools
Messaging-Anwendungen
Hintergrunddienste
Systemüberwachungswerkzeuge
Hinweise
Beschränkt auf die Windows-Plattform
Erfordert Windows 10 oder höher
Keine Unterstützung für Linux oder macOS
Das Verhalten von Benachrichtigungen kann je nach Windows-Version variieren
In einigen Umgebungen müssen Berechtigungen möglicherweise konfiguriert werden
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
A library for sending notifications on Windows using Flutter
Features
Sending notifications by ready-made templates of the plugin
Send notifications by user-created templates
Receive notification events sent
Delete all notifications sent by you from Windows Action Center
Delete notifications group sent by you from Windows Action Center
Add deep link to notification
Usage
Send notification with plugin template
Sending notifications through the plugin's own templates, there are currently 3 template available in the plugin.
import'package:windows_notification/notification_message.dart';
import'package:windows_notification/windows_notification.dart';
// Create an instance of Windows Notification with your application name// application id must be null in packaged modefinal _winNotifyPlugin = WindowsNotification(applicationId: "r"{D65231B0-B2F1-4857-A4CE-A8E7C6EA7D27}\WindowsPowerShell\v1.0\powershell.exe"");
// create new NotificationMessage instance with id, title, body, and imagesNotificationMessage message = NotificationMessage.fromPluginTemplate(
"test1",
"TEXT",
"TEXT",
largeImage: file_path,
image: file_path
);
// show notification
_winNotifyPlugin.showNotificationPluginTemplate(message);
Notification with imge and large image
Notification with imge
notification without any image
Send notification with custom template
You can use the template made by you to send the notification
You can find a lot of templates code with a simple search on the Internet
The Launch option allows you to embed your app's deep leak into the notification, and the target user will be redirected to the relevant page by tapping on the notification.
NotificationMessage message = NotificationMessage.fromPluginTemplate(
"test1", "You Win", "Tap to receive a gift",
launch: "my-app-schame://page1");
_winNotifyPlugin.showNotificationPluginTemplate(message);
Feature requests and bugs
Please file feature requests and bugs at the issue tracker.
If you want to contribute to this library, please submit a Pull Request.