flutter_local_notifications_platform_interface

12.2.0

A common platform interface for the flutter_local_notifications plugin.

Download archive

Readme

flutter_local_notifications_platform_interface

A common platform interface for the flutter_local_notifications plugin.

Usage

Platform-specific implementations should extend from the FlutterLocalNotificationsPlatform class. Upon registering the plugin, the default implementation FlutterLocalNotificationsPlatform can be set by calling FlutterLocalNotificationsPlatform.instance = MyFlutterLocalNotificationsPlatform() where MyFlutterLocalNotificationsPlatform() represents the platform-specific implementation.

Changelog

[12.2.0]

  • Added openAppNotificationSettings() method. When implemented, this opens the system settings UI where the user can manage notification permissions for the app. Thanks to the PR from hamadcc

[12.1.0]

  • Added NotificationResponseType.notificationDismissed enum value to support handling when a notification has been dismissed. Thanks to the PR from Vasily Laushkin

[12.0.1]

  • Fixed API docs of NotificationResponseType.selectedNotificationAction. Thanks to the PR from fush1m1

[12.0.0]

  • Added zonedScheduled() to the platform interface and moved DateTimeComponents from main plugin to platform interface. Thanks to the PR from Gaurav Yadav

[11.0.0]

  • Breaking change bumped minimum Flutter SDK requirement to 3.38.1 and Dart SDK requirement to 3.10.0

[10.0.0]

  • Breaking change bumped minimum Flutter SDK requirement to 3.32.0 and Dart SDK requirement to 3.8.0
  • Breaking changes the positional parameters in the following methods have now been converted to named parameters
    • show()
    • periodicallyShow()
    • periodicallyShowWithDuration()
    • cancel()
  • Added flutter_lints to apply linter rules

[9.1.0]

  • Added cancelAllPendingNotifications() method for cancelling all pending notifications that have been scheduled. Thanks to the PR from Kwon Tae Hyung

[9.0.0]

  • Breaking change bumped minimum Flutter SDK requirement to 3.22.0 and Dart SDK requirement to 3.4.0
  • Bumped minimum plugin_platform_interface version to 2.1.8
  • Added data property to NotificationResponse class to support notification actions on Windows. Thanks to the PR from Levi Lesches

[8.0.0]

  • Breaking change Bumped minimum Flutter SDK requirement to 3.13

[7.2.0]

  • Added periodicallyShowWithDuration() and corresponding validateRepeatDurationInterval() helper method to ensure duration is at least a minute

[7.1.0]

  • [Android] bigText has added to ActiveNotification that allows getting information about the longer text associated with a notification displayed using the big text style. Thanks to the PR from vulpeep

[7.0.0+1]

  • Bumped maximum Dart SDK constraint

[7.0.0]

  • Breaking change the id property of the ActiveNotification class is now nullable to help indicate that the notification may not have been created by the plugin e.g. it was from Firebase Cloud Messaging. Thanks to the PR from frankvollebregt
  • Updated minimum Flutter SDK constraint to 3.0 and minimum Dart SDK constraint to 2.17 to align with versions used by actual plugin implementation
  • Bumped mockito dev dependency

[6.0.0]

  • Breaking change the parameters of ActiveNotification's constructor are now are named instead of positional
  • Breaking change removed SelectNotificationCallback typedefs. The DidReceiveNotificationResponseCallback and DidReceiveBackgroundNotificationResponseCallback are the new typedefs for notification callbacks that run on the main isolate and background isolate respectively. Both of these pass an instance of the NotificationResponse class
  • Breaking change the NotificationAppLaunchDetails has been updated to contain an instance NotificationResponse class with the payload belonging to the NotificationResponse class. This is to allow knowing more details about what caused the app to launch e.g. if a notification action was used to do so
  • [Android] groupKey has been added to ActiveNotification. This was previously available in version 9.1.0 of the flutter_local_notifications plugin but then removed as it should've been part of a major release instead of a minor one
  • [Android] tag has been added to ActiveNotification. This was available in version 9.4.0 of the flutter_local_notifications plugin but has been brought here since ActiveNotification is now part of this package's APIs

[5.0.0]

  • Breaking change the SelectNotificationCallback typedef now maps to a function that returns void instead of a Future<dynamic>. This change was done to better communicate the plugin doesn't actually await any asynchronous computation and is similar to how button pressed callbacks work for Flutter where they are typically use VoidCallback

[4.0.1]

  • Moved the SelectNotificationCallback typedef and validateId method previously defined in the plugin to the platform interface. This is so they could be reused by platform implementations

[4.0.0]

  • Updated Flutter SDK constraint
  • Updated Dart SDK constraint
  • Bumped mockito dependency

[3.0.0]

  • Migrated to null safety

[2.0.0+1]

  • Added more API docs

[2.0.0]

  • BREAKING CHANGE renamed RepeatInterval enum values to use lower camel casing
  • Bump plugin_platform_interface dependency

[1.0.1]

  • Add pendingNotificationRequests()

[1.0.0+1]

  • Fix link to repo in pubspec
  • Update readme

[1.0.0]

  • Initial release of platform interface

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add flutter_local_notifications_platform_interface
pubspec.yaml
name: flutter_local_notifications_platform_interface
description: A common platform interface for the flutter_local_notifications plugin.
version: 12.2.0
homepage: https://github.com/MaikuB/flutter_local_notifications/tree/master/flutter_local_notifications_platform_interface
issue_tracker: https://github.com/MaikuB/flutter_local_notifications/issues

environment:
  sdk: ^3.10.0
  flutter: ">=3.38.1"

dependencies:
  plugin_platform_interface: ^2.1.8
  timezone: ^0.11.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^6.0.0
  mockito: ^5.3.2

Version history

VersionPublishedArchiveSHA-256
1.0.0On demandDownloada50827b9…12a43c
1.0.0+1On demandDownload77f825c2…ef05c4
1.0.1On demandDownload7fec7ba6…bd7481
2.0.0-beta.1On demandDownloadd1755ef4…7dd4cf
2.0.0On demandDownload0068c80f…7e9cfb
2.0.0+1On demandDownload0c75bc78…c3e8bb
3.0.0-nullsafety.0On demandDownload4857e9c8…001f2d
3.0.0-nullsafety.1On demandDownloadccc03ee2…3cc388
3.0.0-nullsafety.2On demandDownload8241c53d…01d131
3.0.0-nullsafety.3On demandDownloada9e1d6c2…8320fa
3.0.0-nullsafety.4On demandDownload85319dad…25e955
3.0.0On demandDownload60a02e35…3bf8e8
4.0.0On demandDownloadeab7fdca…5489e6
4.0.1On demandDownload7744aad0…d5c2e7
5.0.0-dev.1On demandDownload34423785…e2f143
5.0.0On demandDownload21bceee1…d63d3a
6.0.0-dev.1On demandDownload6bdc4476…ae4023
6.0.0-dev.2On demandDownload84ecdad9…e32d8a
6.0.0-dev.3On demandDownload39e7e2bf…71db01
6.0.0-dev.4On demandDownload66719fbc…fb52bf
6.0.0On demandDownload5ec1feac…00d1ab
7.0.0-dev.1On demandDownload9eb4d906…6095f0
7.0.0-dev.3On demandDownloadd7d99905…cc918a
7.0.0On demandDownload63235c42…1c107c
7.0.0+1On demandDownload7cf643d6…e660ef
7.1.0On demandDownload340abf67…db30b7
7.2.0On demandDownload85f8d07f…a4ea66
8.0.0-dev.1On demandDownload42f5edb8…6af5b7
8.0.0On demandDownload6c5b83c8…26fd52
8.1.0-dev.1On demandDownload2e387899…2771c7
9.0.0-dev.1On demandDownload4d3acbc6…abfc6f
9.0.0On demandDownload2569b973…d1631c
9.1.0On demandDownload277d25d9…9d09fe
10.0.0-dev.1On demandDownloadddeee725…efc75d
10.0.0-dev.2On demandDownload80b17e8e…458d8a
10.0.0On demandDownload23de3167…eba899
11.0.0-dev.1On demandDownload2adc3c14…5d5ddc
11.0.0On demandDownloade7db3d5b…0d7307
12.0.0-dev.1On demandDownload21d45c42…243646
12.0.0On demandDownloadff0013ea…5bd814
12.0.1On demandDownload4dfbae10…a8a852
12.1.0On demandDownload945a438a…12bf37
12.2.0Cached · Upstream SHA-256 matchedDownload43c3761d…d399bd
13.0.0-dev.1On demandDownloadc52ce1df…5c945c

Dependencies

plugin_platform_interface "^2.1.8"

timezone "^0.11.0"