DitoNotificationInfo.fromMap constructor
Implementation
factory DitoNotificationInfo.fromMap(Map<Object?, Object?> map) {
return DitoNotificationInfo(
id: map['id'] as String? ?? '',
notificationId: map['notificationId'] as String? ?? '',
reference: map['reference'] as String? ?? '',
title: map['title'] as String? ?? '',
message: map['message'] as String? ?? '',
link: map['link'] as String? ?? '',
receivedAt: DateTime.fromMillisecondsSinceEpoch(
(map['receivedAt'] as num?)?.toInt() ?? 0,
),
isRead: map['isRead'] as bool? ?? false,
);
}