Skip to content
pubscout

js_notifications

1.0.0, released 4 months ago by earthbase.io

Extended Web Notifications API for Dart with action buttons and custom options.

WASM-ready
$ flutter pub add js_notifications
Source repository

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.

Works with

Packages commonly used together with js_notifications: ones it builds on, ones built on it, and its own family.