fromJson static method

NotificationTypeNewPushMessage? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static NotificationTypeNewPushMessage? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return NotificationTypeNewPushMessage(
    messageId: (json['message_id'] as int?) ?? 0,
    senderId: MessageSender.fromJson(tdMapFromJson(json['sender_id'])),
    senderName: (json['sender_name'] as String?) ?? '',
    isOutgoing: (json['is_outgoing'] as bool?) ?? false,
    content: PushMessageContent.fromJson(tdMapFromJson(json['content'])),
  );
}