StubNotificationPort class

Stub implementation for testing.

Implemented types

Constructors

StubNotificationPort({bool simulateSuccess = true, Duration simulateDelay = Duration.zero})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sentNotifications List<Notification>
final

Methods

cancel(String notificationId) Future<bool>
Cancel a pending notification.
override
clear() → void
Clear all sent notifications (for testing).
getHistory({String? recipientId, NotificationType? type, DateTime? since, int limit = 100}) Future<List<NotificationRecord>>
Get notification history for a recipient.
override
getStatus(String notificationId) Future<NotificationStatus>
Get the status of a sent notification.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify(Notification notification) Future<NotificationResult>
Send a single notification.
override
notifyBatch(List<Notification> notifications) Future<List<NotificationResult>>
Send multiple notifications.
override
toString() String
A string representation of this object.
inherited

Operators

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