js_notifications
1.0.0, released 4 months ago by earthbase.io
Extended Web Notifications API for Dart with action buttons and custom options.
What it does
Extends standard Dart web notifications to allow advanced customization such as action buttons, tags, custom icons, and interaction persistence. It handles service worker registration automatically out-of-the-box and provides streams for notification actions and dismissals.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter web application that requires interactive web notifications.
- You need custom actions, tags, or persistent notifications on browsers.
Skip it when
- Your application targets mobile or desktop native platforms instead of the web.
- You are looking for a complete push notification service like Firebase Messaging.
Strengths
- Zero-setup service worker bundled as an asset automatically.
- Full migration to package:web and WebAssembly support.
- Supports interactive actions and notification streams.
Weaknesses
- Web-only package; does not support native mobile or desktop platforms.
- Platform action limits vary based on browser and OS capabilities (e.g. macOS limits actions).
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
No manual service worker copying required anymore. The service worker is deployed automatically as a bundled asset.
JsNotificationsPlatform.instance.showNotification("Test Notification", tag: "test");Alternatives
Packages that do the same job and could replace js_notifications.
- flutter_local_notifications_linux
Linux implementation of the flutter_local_notifications plugin.
81Compare - firebase_in_app_messaging
Flutter plugin for Firebase In-App Messaging campaigns.
93Compare - flutter_notification_listener
Flutter plugin to listen for all incoming notifications on Android.
56Compare - flutter_notification_channel
Plugin for registering and configuring Android notification channels.
55Compare
Works with
Packages commonly used together with js_notifications: ones it builds on, ones built on it, and its own family.
- uuidjs_notifications depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- webjs_notifications depends on itLightweight bindings for browser APIs via JS interop
- plugin_platform_interfacejs_notifications depends on itReusable base class for platform interfaces of Flutter federated plugins.