fromJson static method

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

Implementation

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

  return CommunityAddChatRequest(
    chatId: (json['chat_id'] as int?) ?? 0,
    isHidden: (json['is_hidden'] as bool?) ?? false,
    senderUserId: (json['sender_user_id'] as int?) ?? 0,
    date: (json['date'] as int?) ?? 0,
  );
}