create static method

UserPrivacySetting create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "userPrivacySetting",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "userPrivacySetting",
  5. UserPrivacySettingShowStatus? user_privacy_setting_show_status,
  6. UserPrivacySettingShowProfilePhoto? user_privacy_setting_show_profile_photo,
  7. UserPrivacySettingShowLinkInForwardedMessages? user_privacy_setting_show_link_in_forwarded_messages,
  8. UserPrivacySettingShowPhoneNumber? user_privacy_setting_show_phone_number,
  9. UserPrivacySettingShowBio? user_privacy_setting_show_bio,
  10. UserPrivacySettingShowBirthdate? user_privacy_setting_show_birthdate,
  11. UserPrivacySettingAllowChatInvites? user_privacy_setting_allow_chat_invites,
  12. UserPrivacySettingAllowCalls? user_privacy_setting_allow_calls,
  13. UserPrivacySettingAllowPeerToPeerCalls? user_privacy_setting_allow_peer_to_peer_calls,
  14. UserPrivacySettingAllowFindingByPhoneNumber? user_privacy_setting_allow_finding_by_phone_number,
  15. UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages? user_privacy_setting_allow_private_voice_and_video_note_messages,
  16. UserPrivacySettingAutosaveGifts? user_privacy_setting_autosave_gifts,
  17. UserPrivacySettingAllowUnpaidMessages? user_privacy_setting_allow_unpaid_messages,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static UserPrivacySetting create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "userPrivacySetting",
  bool special_is_json_scheme_class = true,
  String special_return_type = "userPrivacySetting",
  UserPrivacySettingShowStatus? user_privacy_setting_show_status,
  UserPrivacySettingShowProfilePhoto? user_privacy_setting_show_profile_photo,
  UserPrivacySettingShowLinkInForwardedMessages? user_privacy_setting_show_link_in_forwarded_messages,
  UserPrivacySettingShowPhoneNumber? user_privacy_setting_show_phone_number,
  UserPrivacySettingShowBio? user_privacy_setting_show_bio,
  UserPrivacySettingShowBirthdate? user_privacy_setting_show_birthdate,
  UserPrivacySettingAllowChatInvites? user_privacy_setting_allow_chat_invites,
  UserPrivacySettingAllowCalls? user_privacy_setting_allow_calls,
  UserPrivacySettingAllowPeerToPeerCalls? user_privacy_setting_allow_peer_to_peer_calls,
  UserPrivacySettingAllowFindingByPhoneNumber? user_privacy_setting_allow_finding_by_phone_number,
  UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages? user_privacy_setting_allow_private_voice_and_video_note_messages,
  UserPrivacySettingAutosaveGifts? user_privacy_setting_autosave_gifts,
  UserPrivacySettingAllowUnpaidMessages? user_privacy_setting_allow_unpaid_messages,
}) {
  // UserPrivacySetting userPrivacySetting = UserPrivacySetting({
  final Map userPrivacySetting_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "user_privacy_setting_show_status": (user_privacy_setting_show_status != null) ? user_privacy_setting_show_status.toJson() : null,
    "user_privacy_setting_show_profile_photo": (user_privacy_setting_show_profile_photo != null) ? user_privacy_setting_show_profile_photo.toJson() : null,
    "user_privacy_setting_show_link_in_forwarded_messages": (user_privacy_setting_show_link_in_forwarded_messages != null) ? user_privacy_setting_show_link_in_forwarded_messages.toJson() : null,
    "user_privacy_setting_show_phone_number": (user_privacy_setting_show_phone_number != null) ? user_privacy_setting_show_phone_number.toJson() : null,
    "user_privacy_setting_show_bio": (user_privacy_setting_show_bio != null) ? user_privacy_setting_show_bio.toJson() : null,
    "user_privacy_setting_show_birthdate": (user_privacy_setting_show_birthdate != null) ? user_privacy_setting_show_birthdate.toJson() : null,
    "user_privacy_setting_allow_chat_invites": (user_privacy_setting_allow_chat_invites != null) ? user_privacy_setting_allow_chat_invites.toJson() : null,
    "user_privacy_setting_allow_calls": (user_privacy_setting_allow_calls != null) ? user_privacy_setting_allow_calls.toJson() : null,
    "user_privacy_setting_allow_peer_to_peer_calls": (user_privacy_setting_allow_peer_to_peer_calls != null) ? user_privacy_setting_allow_peer_to_peer_calls.toJson() : null,
    "user_privacy_setting_allow_finding_by_phone_number": (user_privacy_setting_allow_finding_by_phone_number != null) ? user_privacy_setting_allow_finding_by_phone_number.toJson() : null,
    "user_privacy_setting_allow_private_voice_and_video_note_messages": (user_privacy_setting_allow_private_voice_and_video_note_messages != null) ? user_privacy_setting_allow_private_voice_and_video_note_messages.toJson() : null,
    "user_privacy_setting_autosave_gifts": (user_privacy_setting_autosave_gifts != null) ? user_privacy_setting_autosave_gifts.toJson() : null,
    "user_privacy_setting_allow_unpaid_messages": (user_privacy_setting_allow_unpaid_messages != null) ? user_privacy_setting_allow_unpaid_messages.toJson() : null,
  };

  userPrivacySetting_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (userPrivacySetting_data_create_json.containsKey(key) == false) {
        userPrivacySetting_data_create_json[key] = value;
      }
    });
  }
  return UserPrivacySetting(userPrivacySetting_data_create_json);
}