windows_notification 패키지는 윈도우에서 사용 가능한 커스터마이즈 가능한 템플릿을 사용하여 시스템 알림을 보내는 데 Flutter 애플리케이션을 가능하게 합니다. 이 패키지는 윈도우 알림 API와 통합되어 제목, 메시지 및 이미지나 버튼과 같은 풍부한 콘텐츠를 포함한 토스트 알림을 표시할 수 있게 해줍니다. 실시간 사용자 경고 또는 상태 업데이트가 필요한 데스크톱 앱에 적합합니다. 간단하고 고급 알림 레이아웃 모두 지원하므로 생산성 도구, 메시징 앱, 백그라운드 서비스에 적합합니다. 가볍고 Windows 플랫폼 전용으로 설계되었습니다.
사용 사례
앱 알림 전송
시스템 알림 표시
사용자 활동 알림
백그라운드 작업 알림
실시간 업데이트 표시
주요 기능
사용자 정의 알림 템플릿
이미지와 같은 풍부한 콘텐츠 지원
Windows 알림 API와의 통합
간단하고 직관적인 API
윈도우 전용
적합한 대상
Windows 데스크톱 앱
생산성 도구
메시징 애플리케이션
백그라운드 서비스
시스템 모니터링 유틸리티
고려 사항
Windows 플랫폼에 한정
Windows 10 이상 필요
Linux 또는 macOS 지원 없음
알림 동작은 Windows 버전에 따라 달라질 수 있습니다
일부 환경에서는 권한 설정이 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
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.