class NotificationMessage { String? notificationType; String? title; String? body; String? id; String? type; String? link; String? image; String? photo; String? groupKey; String? userId; NotificationMessage({ this.notificationType, this.title, this.body, this.id, this.type, this.link, this.image, this.photo, this.groupKey, this.userId, }); NotificationMessage.fromJson(Map json) { notificationType = json['notificationType']; title = json['title']; body = json['body']; id = json['id']; type = json['type']; link = json['link']; image = json['image']; photo = json['photo']; groupKey = json['groupKey']; userId = json['userId']; } Map toJson() { final Map data = {}; data['notificationType'] = notificationType; data['title'] = title; data['body'] = body; data['id'] = id; data['type'] = type; data['link'] = link; data['image'] = image; data['photo'] = photo; data['groupKey'] = groupKey; data['userId'] = userId; return data; } Map toPayload() { final Map data = {}; data['notificationType'] = notificationType ?? ''; data['title'] = title ?? ''; data['body'] = body ?? ''; data['id'] = id ?? ''; data['type'] = type ?? ''; data['link'] = link ?? ''; data['image'] = image ?? ''; data['photo'] = photo ?? ''; data['userId'] = userId ?? ''; return data; } }