NotificationPayload.fromMap constructor

NotificationPayload.fromMap(
  1. Map<String, dynamic>? json
)

Implementation

NotificationPayload.fromMap(Map<String, dynamic>? json) {
  if (json != null) {
    id = json['_id'];
    rid = json['rid'];
    sender = json['sender'] != null
        ? NotificationUser.fromMap(json['sender'])
        : null;
    type = json['type'];
    message = json['message'] != null
        ? NotificationMessage.fromMap(json['message'])
        : null;
  }
}