clear_notification_tray 0.0.1 copy "clear_notification_tray: ^0.0.1" to clipboard
clear_notification_tray: ^0.0.1 copied to clipboard

A plugin to clear notification tray in flutter.

clear_notification_tray #

A Flutter plugin to dismiss notifications in Android and iOS.

How to use the plugin #

In the pubspec.yaml of your flutter project, add the following dependency:

    dependencies :
      clear_notification_tray: latest_version_number

The clear method can be called to clear all the notifications received by your app.
Upon receiving the push notifications, iOS applications display a red badge with notification count inside. It also dismisses this badge count.

To clear all notifications when the app is started, call the clear method in your main method.

void main() {
  runApp(MyApp());
  ClearNotificationTray.clear();
}

iOS compatibility #

This plugin is only compatible for clearing notifications in iOS devices running with iOS version 10.0 or above.
The methods will return a PlatformException for iOS version less than 10.0 without dismissing notifications.
The plugin uses UNUserNotificationCenter API to clear notification and reset the badge number on the app icon that was introduced in iOS version 10.0.
Before iOS 10.0, there wasn't a standardized way to programmatically clear notifications or reset the badge number.

3
likes
0
points
194
downloads

Publisher

unverified uploader

Weekly Downloads

A plugin to clear notification tray in flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on clear_notification_tray