Notifications.fromJson constructor

Notifications.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Notifications.fromJson(Map<String, dynamic> json) {
  return Notifications(
    notificationId: json['notification_id'] as String? ?? json['notificationId'] as String?,
    notificationType: json['NotificationType'] != null ? NotificationType.fromJson(Map<String, dynamic>.from(json['NotificationType'])) : null,
    isRead: json['is_read'] as bool? ?? json['isRead'] as bool?,
    notificationDate: json['notification_date'] as String? ?? json['notificationDate'] as String?,
    notificationTitle: json['notification_title'] as String? ?? json['notificationTitle'] as String?,
    notificationImage: json['notification_image'] as String? ?? json['notificationImage'] as String?,
  );
}