-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flutter_local_notifications] add ability to manage notification chan…
…nel groups (#870) * add ability to manage notification channel groups * update code for deleting notification channels to use NotificationManagerCompat that includes API level check already * bump plugin version to 3.0.1 * updat PR template so that the note for prefixing PR title is a comment * Revert "updat PR template so that the note for prefixing PR title is a comment" This reverts commit 82bb33b. * fix API docs * retrigger checks * add missing word to changelog entry
- Loading branch information
Showing
12 changed files
with
239 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
.../java/com/dexterous/flutterlocalnotifications/models/NotificationChannelGroupDetails.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.dexterous.flutterlocalnotifications.models; | ||
|
||
import java.util.Map; | ||
|
||
public class NotificationChannelGroupDetails { | ||
private static final String ID = "id"; | ||
private static final String NAME = "name"; | ||
private static final String DESCRIPTION = "description"; | ||
|
||
|
||
public String id; | ||
public String name; | ||
public String description; | ||
|
||
public static NotificationChannelGroupDetails from(Map<String, Object> arguments) { | ||
NotificationChannelGroupDetails notificationChannelGroupDetails = new NotificationChannelGroupDetails(); | ||
notificationChannelGroupDetails.id = (String) arguments.get(ID); | ||
notificationChannelGroupDetails.name = (String) arguments.get(NAME); | ||
notificationChannelGroupDetails.description = (String) arguments.get(DESCRIPTION); | ||
return notificationChannelGroupDetails; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...er_local_notifications/lib/src/platform_specifics/android/notification_channel_group.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// A group of related Android notification channels. | ||
class AndroidNotificationChannelGroup { | ||
const AndroidNotificationChannelGroup( | ||
this.id, | ||
this.name, { | ||
this.description, | ||
}); | ||
|
||
/// The id of this group. | ||
final String id; | ||
|
||
/// The name of this group. | ||
final String name; | ||
|
||
/// The description of this group. | ||
/// | ||
/// Only applicable to Android 9.0 or newer. | ||
final String description; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.