Skip to content
pubscout

platform_local_notifications

4.0.0, released 2 weeks ago by vchatsdk.com

Cross-platform local notifications plugin supporting Android, iOS, Web, Windows, macOS, and Linux.

$ flutter pub add platform_local_notifications
Source repository

What it does

Provides a unified facade for managing and showing local notifications and chat-style messages with interactive actions across multiple operating systems. It handles platform initialization, payload delivery, notification cancellation, and user action streams.

AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display standard local notifications or chat-style notifications across Android, iOS, Web, Windows, macOS, and Linux.
  • Your app needs to handle click events, reply actions, or mark-as-read actions via a unified stream.
  • You want to target both JavaScript and WebAssembly on web browsers using the native Browser Notifications API.

Skip it when

  • You require server-driven push notifications or background messaging handlers that persist reliably after app termination without custom native setup.
  • You are targeting mobile web browsers requiring service-worker notifications (such as iOS browsers).

Strengths

  • Comprehensive cross-platform support including mobile, desktop, and web.
  • Includes built-in chat-style notifications and interactive actions on Android with standard fallbacks on other platforms.
  • Provides a unified stream API for actions like clicks, replies, and mark-as-read.

Weaknesses

  • Does not persist or replay actions after app termination without custom native configuration.
  • Web backend is page-scoped and requires the page to stay open to receive clicks.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
5

Requires platform-specific configuration such as adding an action broadcast receiver in the Android manifest, setting notification center delegates on iOS and macOS, and ensuring proper desktop server/identity setup on Windows and Linux.

import 'package:flutter/widgets.dart';
import 'package:platform_local_notifications/platform_local_notifications.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await PlatformNotifier.initialize(appName: 'My App');
}

Future<void> showStandard() => PlatformNotifier.showNotification(
  model: const NotificationModel(
    id: 43,
    title: 'Reminder',
    body: 'Your meeting starts soon.',
    payload: 'meeting-43',
  ),
);

Alternatives

Packages that do the same job and could replace platform_local_notifications.

Works with

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