{"id":15546610,"url":"https://github.com/klisiewicz/flutter-notification-manager","last_synced_at":"2025-03-29T01:17:18.888Z","repository":{"id":224370955,"uuid":"763076248","full_name":"klisiewicz/flutter-notification-manager","owner":"klisiewicz","description":"Android Notification Manager plugin that allows to create and manage notification channels.","archived":false,"fork":false,"pushed_at":"2024-06-18T08:56:06.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-09T13:11:09.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klisiewicz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-25T13:54:50.000Z","updated_at":"2024-06-18T08:56:10.000Z","dependencies_parsed_at":"2024-06-18T10:07:42.187Z","dependency_job_id":"7d486978-c0b3-4277-bf80-ecb1788e454c","html_url":"https://github.com/klisiewicz/flutter-notification-manager","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"07b2443acdef65444913298121ebc89e841bcebc"},"previous_names":["klisiewicz/flutter-notification-manager"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisiewicz%2Fflutter-notification-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisiewicz%2Fflutter-notification-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisiewicz%2Fflutter-notification-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisiewicz%2Fflutter-notification-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klisiewicz","download_url":"https://codeload.github.com/klisiewicz/flutter-notification-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246122391,"owners_count":20726823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T13:03:00.269Z","updated_at":"2025-03-29T01:17:18.858Z","avatar_url":"https://github.com/klisiewicz.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Notification Manager\n\nAndroid Notification Manager plugin that allows to create and manage notification channels.\n\n## Create a notification channel\n\nYou can create a notification channel by calling `createNotificationChannel()` :\n\n```dart\nconst notificationManager = NotificationManager(); \nawait notificationManager.createNotificationChannel(\n  NotificationChannel(\n    id: 'my_channel_01',\n    name: 'My First Channel',\n    importance: Importance.standard,\n  ),\n);\n```\nRecreating an existing notification channel with its original values performs no operation, so it's safe to call this code when starting an app.\n\n❗ After you create a notification channel, you can't change the notification behaviors. However, you can still change a channel's name and description.\n\n## Read notification channel settings\n\nYou can read notification channel setting by calling `getNotificationChannel()` or `getNotificationChannels()`.\n\n```dart\nconst notificationManager = NotificationManager();  \nfinal myChannel = await notificationManager.getNotificationChannel('my_channel_01');  \nfinal allChannels = await notificationManager.getNotificationChannels();\n```\n\n## Open the notification channel settings\n\nNot supported yet.\n\n## Delete a notification channel\n\nYou can delete notification channels by calling `deleteNotificationChannel()`:\n\n```dart\nconst notificationManager = NotificationManager();\nnotificationManager.deleteNotificationChannel('my_channel_01');\n```\n\n## Create a notification channel group\n\nEach notification channel group requires an ID, which must be unique within your package, as well as a user-visible name.\n\n```dart\nconst notificationManager = NotificationManager();\nconst group = NotificationChannelGroup(id: 'my_group_01', name: 'My first group');\nnotificationManager.createNotificationChannelGroup(group);\n```\nAfter you create a new group, you can assign a `NotificationChannel` to that group by passing `groupId` constructor parameter:\n\n```dart\nconst channel = NotificationChannel(\n  // ...\n  groupId: 'my_group_01',\n);\n```\n\n❗ Afater you submit the channel to the notification manager, you cannot change the association between notification channel and group.\n\n## Backward Compatibility\n\nThe Support Library doesn't include notification channels APIs. As a result some functionalities are available only for specific Android versions. The **minimum Android version** required for `NotificationManager`  to have any effect is **8.0 (API level 26)**.\n\nThe following tables show available operations based on the Android SDK version:\n\n- `NotificationManager`\n\n|                                   | API 26 O | API 28 P + |\n|-----------------------------------|----------|------------|\n| `createNotificationChannel`       | ✅        | ✅          |\n| `createNotificationChannels`      | ✅        | ✅          |\n| `createNotificationChannelGroup`  | ✅        | ✅          |\n| `createNotificationChannelGroups` | ✅        | ✅          |\n| `deleteNotificationChannel`       | ✅        | ✅          |\n| `createNotificationChannelGroup`  | ✅        | ✅          |\n| `getNotificationChannel`          | ✅        | ✅          |\n| `getNotificationChannels`         | ✅        | ✅          |\n| `getNotificationChannelGroup`     | ❌        | ✅          |\n| `getNotificationChannelGroups`    | ✅        | ✅          |\n\n- `NotificationChannel`\n\n|                    | API 26 O | API 28 P | API 29 Q | API 30 R + |\n|--------------------|----------|----------|----------|------------|\n| `id`               | ✅        | ✅        | ✅        | ✅          |\n| `name`             | ✅        | ✅        | ✅        | ✅          |\n| `importance`       | ✅        | ✅        | ✅        | ✅          |\n| `description`      | ✅        | ✅        | ✅        | ✅          |\n| `groupId`          | ✅        | ✅        | ✅        | ✅          |\n| `conversation`     | ❌        | ❌        | ❌        | ✅          |\n| `showBubble`       | ❌        | ❌        | ✅        | ❌          |\n| `showBadge`        | ✅        | ✅        | ✅        | ✅          |\n| `enableLights`     | ✅        | ✅        | ✅        | ✅          |\n| `lightColor`       | ✅        | ✅        | ✅        | ✅          |\n| `enableVibrations` | ✅        | ✅        | ✅        | ✅          |\n\n- `NotificationChannelGroup`\n\n|               | API26 O | API 28 P + |\n|---------------|---------|------------|\n| `id`          | ✅       | ✅          |\n| `name`        | ✅       | ✅          |\n| `description` | ❌       | ✅          |\n\n## Error Handling\n\nCalling any of `NotificationManager` methods on API level 25 and below will not have any effect and will also not result in any error. The same rule applies to any of the `NotificationChannel` and `NotificationChannelGroup` properties. \n\nBut there are some preconditions that must be met when creating a `NotificationChannel` and `NotificationChannelGroup`:\n\n- `NotificationChannel`\n  - `id` must not be null, empty or blank\n\n- `NotificationChannelGroup`\n  - `id` must not be null, empty or blank\n  - `importance` must not be `Importance.unspecified`\n\nBreaking any of these will result in `PlatformException` with `INVALID_ARGUMENT` code.\n\nYou might also experience a `PlatformException` with `UNKNOWN` code. This exception should not happen and most likely indicates an edge case that has not yet been properly handled.\n\n## Read More\n\n- [Android Developers docs](https://developer.android.com/develop/ui/views/notifications/channels)\n- [Android `NotificationManager` docs](https://developer.android.com/reference/android/app/NotificationManager)\n- [Android `NotificationChannel` docs](https://developer.android.com/reference/android/app/NotificationChannel)\n- [Android `NotificationChannelGroup` docs](https://developer.android.com/reference/android/app/NotificationChannelGroup)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklisiewicz%2Fflutter-notification-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklisiewicz%2Fflutter-notification-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklisiewicz%2Fflutter-notification-manager/lists"}