F

flutter_local_notifications_aurora

A cross platform plugin for displaying and scheduling local notifications for Flutter applications with the ability to customise for Aurora OS

RU | EN

flutter_local_notifications_aurora

Original Readme.

Description

The Aurora implementation of flutter_local_notifications.

A plugin for displaying local notifications for OS Aurora.

Quickstart: Basic Usage Example

import 'package:flutter_local_notifications/flutter_local_notifications.dart';

final notificationID = 1;
final FlutterLocalNotificationsPlugin notification = FlutterLocalNotificationsPlugin();

await flutterLocalNotificationsPlugin.show(
  notificationID,
  "Title notification",
  "My long body text notification",
  null, // payload
);

Contents

Installation and build

pubspec.yaml

dependencies:
  flutter_local_notifications: ^18.0.1
  flutter_local_notifications_aurora:
    git:
      url: https://developer.auroraos.ru/git/flutter/flutter-community-plugins/flutter_local_notifications_aurora.git

Detailed description

Methods

Basic Notification

await flutterLocalNotificationsPlugin.show(
  notificationID,
  "Title notification",
  "My long body text notification",
  null, // payload
);

Notification from the payload

await flutterLocalNotificationsPlugin.showWithPayload(
  notificationID,
  "Title notification",
  "Body notification",
  payload: const Payload(
    hints: Hints(
      sound: Sound.messageNewInstant,
      urgency: 2, // critical
      desktopEntry: 'my_app.desktop',
    ),
  ),
);

Cancel a specific notification

await flutterLocalNotificationsPlugin.cancel(notificationID);

Cancel all notifications

await flutterLocalNotificationsPlugin.cancelAll();

Models

The package provides strongly-typed models for notifications:

  • Payload - Main notification container
    • hints: Hints - Notification hints
  • Hints - Notification hints model
    • sound: Sound - Predefined sound enum
    • urgency: int - Urgency level
    • Other standard hint properties

These models help avoid errors when working with notification payloads.

Hints

The package supports standard notification hints according to the Desktop Notifications Specification.

Supported Hints

Name Type Description
urgency byte Urgency level (0-low, 1-normal, 2-critical)
category string Notification category
desktop-entry string Desktop file name (e.g. 'my_app.desktop')
sound-file string Path to sound file (automatically set when using Sound enum)
suppress-sound boolean Disable sound playback
x int X screen coordinate (requires y)
y int Y screen coordinate (requires x)

Predefined Sounds

The package provides enum with common notification sounds:

enum Sound {
  bell,
  complete,
  dialogError,
  dialogInformation,
  dialogWarning,
  messageNewInstant,
  message,
  networkConnectivityEstablished,
  networkConnectivityLost,
  phoneIncomingCall,
}

Compatibility

The application has been working correctly since the 5.0.0 version of the Aurora OS and Flutter 3.32.7.

Terms of Use and Participation

The source code of the project is provided under the license, that allows it to be used in third-party applications.

To participate in the development of the project, please read the contributor agreement. If you plan to contribute your own source code to the project, you will need to accept the CLA agreement.

For information about contributors see AUTHORS.

Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.