fromJson static method

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

Implementation

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

  return NewChatPrivacySettings(
    allowNewChatsFromUnknownUsers:
        (json['allow_new_chats_from_unknown_users'] as bool?) ?? false,
    incomingPaidMessageStarCount:
        (json['incoming_paid_message_star_count'] as int?) ?? 0,
  );
}