Skip to content

Commit 76d874d

Browse files
authored
[flutter_local_notifications_platform_interface] Add pendingNotificationRequests (#443)
* Add pendingNotificationRequests * Remove pod repo update script from iOS build
1 parent 09a9063 commit 76d874d

File tree

6 files changed

+22
-2
lines changed

6 files changed

+22
-2
lines changed

.cirrus.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ build_example_ios_task:
1212
image: mojave-xcode-11.3-flutter
1313
pub_cache:
1414
folder: ~/.pub-cache
15-
update_pods_script: pod repo update # to fetch all the latest versions
1615
build_script:
1716
- cd flutter_local_notifications/example
1817
- flutter build ios --no-codesign --debug

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pubspec.lock

flutter_local_notifications_platform_interface/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [1.0.1]
2+
* Add `pendingNotificationRequests()`
3+
14
## [1.0.0+1]
25
* Fix link to repo in pubspec
36
* Update readme

flutter_local_notifications_platform_interface/lib/flutter_local_notifications_platform_interface.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@ abstract class FlutterLocalNotificationsPlatform extends PlatformInterface {
4949
Future<void> cancelAll() async {
5050
throw UnimplementedError('cancelAll() has not been implemented');
5151
}
52+
53+
/// Returns a list of notifications pending to be delivered/shown
54+
Future<List<PendingNotificationRequest>> pendingNotificationRequests() {
55+
throw UnimplementedError(
56+
'pendingNotificationRequest() has not been implemented');
57+
}
5258
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
/// The available intervals for periodically showing notifications
22
enum RepeatInterval { EveryMinute, Hourly, Daily, Weekly }
3+
4+
/// Details of a pending notification that has not been delivered
5+
class PendingNotificationRequest {
6+
final int id;
7+
final String title;
8+
final String body;
9+
final String payload;
10+
11+
const PendingNotificationRequest(
12+
this.id, this.title, this.body, this.payload);
13+
}

flutter_local_notifications_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_local_notifications_platform_interface
22
description: A common platform interface for the flutter_local_notifications plugin.
3-
version: 1.0.0+1
3+
version: 1.0.1
44
homepage: https://github.com/MaikuB/flutter_local_notifications/tree/master/flutter_local_notifications_platform_interface
55

66
environment:

0 commit comments

Comments
 (0)