NoOpNotificationManager class

A NotificationManager that does nothing.

Use it, e.g. in tests, where no notifications should be shown. All methods return at once; the create and schedule methods return id 0.

Implemented types

Constructors

NoOpNotificationManager()

Properties

hashCode → int
The hash code for this object.
no setterinherited
notificationTaps → Stream<String>
The payloads of tapped notifications created with createNotification. Taps on task notifications are handled by the AppTaskController.
no setteroverride
pendingNotificationRequestsCount → Future<int>
The number of pending notifications.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelNotification(int id) → Future<void>
Cancels (i.e., removes) the notification with id.
override
cancelTaskNotification(UserTask task) → Future<void>
Cancels (i.e., removes) the notification for the task.
override
configure() → Future<void>
Configures and sets up the notification manager.
override
createNotification({int? id, required String title, String? body, String? payload}) → Future<int>
Creates an immediate notification with id, title, and body. If the id is not specified, a random id will be generated. When tapped, payload is emitted on notificationTaps.
override
createTaskNotification(UserTask task) → Future<void>
Creates an immediate notification for a task.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scheduleNotification({int? id, required String title, String? body, required DateTime schedule}) → Future<int>
Schedules a notification with id, title, and body at the schedule time. If the id is not specified, a random id will be generated.
override
scheduleRecurrentNotifications({int? id, required String title, String? body, required RecurrentScheduledTrigger schedule}) → Future<int>
Schedules recurrent notifications with id, title, and body at the schedule time.
override
scheduleTaskNotification(UserTask task) → Future<void>
Schedules a notification for a task at its UserTask.triggerTime.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited