fromJson static method

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

Implementation

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

  return MessageLinkInfo(
    isPublic: (json['is_public'] as bool?) ?? false,
    chatId: (json['chat_id'] as int?) ?? 0,
    topicId: MessageTopic.fromJson(tdMapFromJson(json['topic_id'])),
    message: Message.fromJson(tdMapFromJson(json['message'])),
    mediaTimestamp: (json['media_timestamp'] as int?) ?? 0,
    checklistTaskId: (json['checklist_task_id'] as int?) ?? 0,
    pollOptionId: (json['poll_option_id'] as String?) ?? '',
    forAlbum: (json['for_album'] as bool?) ?? false,
  );
}