Notification.fromJson constructor

Notification.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory Notification.fromJson(Map<String, Object?> json) {
  return Notification(
    htmlBody: json[r'htmlBody'] as String?,
    restrict: json[r'restrict'] != null
        ? NotificationRecipientsRestrictions.fromJson(
            json[r'restrict']! as Map<String, Object?>)
        : null,
    subject: json[r'subject'] as String?,
    textBody: json[r'textBody'] as String?,
    to: json[r'to'] != null
        ? NotificationRecipients.fromJson(
            json[r'to']! as Map<String, Object?>)
        : null,
  );
}