Notification class

Notification to send.

Constructors

Notification({required String notificationId, required String recipientId, required NotificationType type, required String title, required String body, Map<String, dynamic> data = const {}, NotificationPriority priority = NotificationPriority.normal, List<NotificationChannel> channels = const [NotificationChannel.inApp], String? actionUrl, DateTime? expiresAt, DateTime? scheduledAt, String? groupId, Map<String, dynamic> metadata = const {}})
const
Notification.fromJson(Map<String, dynamic> json)
factory

Properties

actionUrl String?
Optional action URL or deep link.
final
body String
Notification body/message.
final
channels List<NotificationChannel>
Channels to use for delivery.
final
data Map<String, dynamic>
Structured data payload.
final
expiresAt DateTime?
When the notification expires (won't be delivered after).
final
groupId String?
Group ID for notification grouping.
final
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>
Additional metadata.
final
notificationId String
Unique notification identifier.
final
priority NotificationPriority
Priority level.
final
recipientId String
Recipient identifier (user ID, email, etc.).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduledAt DateTime?
Schedule for future delivery.
final
title String
Notification title.
final
type NotificationType
Type of notification.
final

Methods

copyWith({String? notificationId, String? recipientId, NotificationType? type, String? title, String? body, Map<String, dynamic>? data, NotificationPriority? priority, List<NotificationChannel>? channels, String? actionUrl, DateTime? expiresAt, DateTime? scheduledAt, String? groupId, Map<String, dynamic>? metadata}) Notification
Create a copy with updated fields.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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