Search packages, repositories and app categories

local_notifier cover
Package detailsv0.1.6

local_notifier

This plugin allows Flutter desktop apps to displaying local notifications.

macOSWindowsLinux
30-day downloads
53.6K
Likes
116
Pub points
150

Install package

flutter pub add local_notifier

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The local_notifier package enables Flutter desktop applications to display local notifications on macOS, Windows, and Linux. It provides a simple interface for scheduling and showing system-level notifications without requiring external services. Designed specifically for desktop platforms, it integrates with native notification systems to deliver timely alerts. The plugin is lightweight and easy to implement, making it ideal for apps that need reminders, status updates, or user alerts. It supports basic notification features such as title, body, and icon display.

Use cases

  • Desktop app reminders
  • System-level alerting
  • Task completion notifications
  • User activity tracking
  • Application status updates

Key features

  • Native desktop notification integration
  • Cross-platform support (macOS, Windows, Linux)
  • Simple API for scheduling and showing notifications
  • Supports custom icons
  • Lightweight and minimal dependencies

Suitable for

  • Flutter developers building desktop apps
  • Apps needing local alerting functionality
  • Developers targeting multiple desktop operating systems
  • Projects requiring lightweight notification solutions

Considerations

  • Limited to desktop platforms
  • No support for mobile devices
  • Notification behavior varies by OS
  • Requires platform-specific configuration for advanced features
  • Does not support rich media or interactive notifications

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

🚀 Ship Your App Faster: Try Fastforge - The simplest way to build, package and distribute your Flutter apps.

local_notifier

pub version

This plugin allows Flutter desktop apps to displaying local notifications.


English | 简体中文


Platform Support

Linux macOS Windows
✔️ ✔️ ✔️

Screenshots

macOS Linux Windows
image

Quick Start

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  local_notifier: ^0.1.6

Or

dependencies:
  local_notifier:
    git:
      url: https://github.com/leanflutter/local_notifier.git
      ref: main
Linux requirements
  • libnotify

Run the following command

sudo apt-get install libnotify-dev
Usage
// Add in main method.
await localNotifier.setup(
  appName: 'local_notifier_example',
  // The parameter shortcutPolicy only works on Windows
  shortcutPolicy: ShortcutPolicy.requireCreate,
);

LocalNotification notification = LocalNotification(
  title: "local_notifier_example",
  body: "hello flutter!",
);
notification.onShow = () {
  print('onShow ${notification.identifier}');
};
notification.onClose = (closeReason) {
  // Only supported on windows, other platforms closeReason is always unknown.
  switch (closeReason) {
    case LocalNotificationCloseReason.userCanceled:
      // do something
      break;
    case LocalNotificationCloseReason.timedOut:
      // do something
      break;
    default:
  }
  print('onClose ${_exampleNotification?.identifier} - $closeReason');
};
notification.onClick = () {
  print('onClick ${notification.identifier}');
};
notification?.onClickAction = (actionIndex) {
  print('onClickAction ${notification?.identifier} - $actionIndex');
};

notification.show();

Please see the example app of this plugin for a full example.

Who's using it?

Related Links

  • https://github.com/mohabouje/WinToast

License

MIT

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package