DeliveryStatusEntity class
Represents the delivery status of a notification.
Constructors
-
DeliveryStatusEntity.new({required String notificationId, required DeliveryStatus status, required DateTime timestamp, String? errorMessage, int retryCount = 0, DateTime? deliveredAt, DateTime? openedAt, DateTime? dismissedAt, Map<
String, dynamic> metadata = const <String, dynamic>{}}) -
Creates a new delivery status entity.
const
-
DeliveryStatusEntity.fromMap(Map<
String, dynamic> map) -
Creates delivery status from a map.
factory
Properties
- deliveredAt → DateTime?
-
When the notification was successfully delivered.
final
- dismissedAt → DateTime?
-
When the notification was dismissed by the user.
final
- errorMessage → String?
-
Error message if delivery failed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFailed → bool
-
Whether the notification delivery failed.
no setter
- isPending → bool
-
Whether the notification is still pending delivery.
no setter
- isSuccessful → bool
-
Whether the notification delivery was successful.
no setter
-
metadata
→ Map<
String, dynamic> -
Additional metadata about the delivery.
final
- notificationId → String
-
The ID of the notification this status belongs to.
final
- openedAt → DateTime?
-
When the notification was opened by the user.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- retryCount → int
-
Number of retry attempts.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → DeliveryStatus
-
The current delivery status.
final
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited - timestamp → DateTime
-
When this status was created or last updated.
final
- wasDismissed → bool
-
Whether the notification was dismissed by the user.
no setter
- wasOpened → bool
-
Whether the notification was opened by the user.
no setter
Methods
-
copyWith(
{String? notificationId, DeliveryStatus? status, DateTime? timestamp, String? errorMessage, int? retryCount, DateTime? deliveredAt, DateTime? openedAt, DateTime? dismissedAt, Map< String, dynamic> ? metadata}) → DeliveryStatusEntity - Creates a copy of this delivery status with updated fields.
-
fromJson(
String json) → DeliveryStatusEntity -
Converts the object from a JSON string representation.
inherited
-
fromMap(
Map< String, dynamic> map) → DeliveryStatusEntity - Converts the object from a Map representation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
Converts the object to a JSON string representation.
inherited
-
toMap(
) → Map< String, dynamic> -
Converts the
BaseDataModel
object to a Map representation. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited