fromEntityPlus static method
Future<NotificationModel?>
fromEntityPlus(
- String documentID,
- NotificationEntity? entity, {
- String? appId,
Implementation
static Future<NotificationModel?> fromEntityPlus(
String documentID, NotificationEntity? entity,
{String? appId}) async {
if (entity == null) return null;
return NotificationModel(
documentID: documentID,
timestamp: entity.timestamp == null
? null
: DateTime.fromMillisecondsSinceEpoch((entity.timestamp as int)),
appId: entity.appId ?? '',
description: entity.description,
read: entity.read,
reporterId: entity.reporterId,
assigneeId: entity.assigneeId,
status: toNotificationStatus(entity.status),
);
}