Skip to content

Commit

Permalink
[flutter_local_notifications_platform_interface] Add pendingNotificat…
Browse files Browse the repository at this point in the history
…ionRequests (#443)

* Add pendingNotificationRequests

* Remove pod repo update script from iOS build
  • Loading branch information
MaikuB authored Jan 18, 2020
1 parent 09a9063 commit 76d874d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
1 change: 0 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ build_example_ios_task:
image: mojave-xcode-11.3-flutter
pub_cache:
folder: ~/.pub-cache
update_pods_script: pod repo update # to fetch all the latest versions
build_script:
- cd flutter_local_notifications/example
- flutter build ios --no-codesign --debug
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pubspec.lock
3 changes: 3 additions & 0 deletions flutter_local_notifications_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [1.0.1]
* Add `pendingNotificationRequests()`

## [1.0.0+1]
* Fix link to repo in pubspec
* Update readme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,10 @@ abstract class FlutterLocalNotificationsPlatform extends PlatformInterface {
Future<void> cancelAll() async {
throw UnimplementedError('cancelAll() has not been implemented');
}

/// Returns a list of notifications pending to be delivered/shown
Future<List<PendingNotificationRequest>> pendingNotificationRequests() {
throw UnimplementedError(
'pendingNotificationRequest() has not been implemented');
}
}
11 changes: 11 additions & 0 deletions flutter_local_notifications_platform_interface/lib/src/types.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
/// The available intervals for periodically showing notifications
enum RepeatInterval { EveryMinute, Hourly, Daily, Weekly }

/// Details of a pending notification that has not been delivered
class PendingNotificationRequest {
final int id;
final String title;
final String body;
final String payload;

const PendingNotificationRequest(
this.id, this.title, this.body, this.payload);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_local_notifications_platform_interface
description: A common platform interface for the flutter_local_notifications plugin.
version: 1.0.0+1
version: 1.0.1
homepage: https://github.com/MaikuB/flutter_local_notifications/tree/master/flutter_local_notifications_platform_interface

environment:
Expand Down

0 comments on commit 76d874d

Please sign in to comment.