UserPrivacySetting.fromJson constructor

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

Implementation

factory UserPrivacySetting.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case UserPrivacySettingShowStatus.CONSTRUCTOR:
      return UserPrivacySettingShowStatus.fromJson(json);
    case UserPrivacySettingShowProfilePhoto.CONSTRUCTOR:
      return UserPrivacySettingShowProfilePhoto.fromJson(json);
    case UserPrivacySettingShowLinkInForwardedMessages.CONSTRUCTOR:
      return UserPrivacySettingShowLinkInForwardedMessages.fromJson(json);
    case UserPrivacySettingShowPhoneNumber.CONSTRUCTOR:
      return UserPrivacySettingShowPhoneNumber.fromJson(json);
    case UserPrivacySettingShowBio.CONSTRUCTOR:
      return UserPrivacySettingShowBio.fromJson(json);
    case UserPrivacySettingAllowChatInvites.CONSTRUCTOR:
      return UserPrivacySettingAllowChatInvites.fromJson(json);
    case UserPrivacySettingAllowCalls.CONSTRUCTOR:
      return UserPrivacySettingAllowCalls.fromJson(json);
    case UserPrivacySettingAllowPeerToPeerCalls.CONSTRUCTOR:
      return UserPrivacySettingAllowPeerToPeerCalls.fromJson(json);
    case UserPrivacySettingAllowFindingByPhoneNumber.CONSTRUCTOR:
      return UserPrivacySettingAllowFindingByPhoneNumber.fromJson(json);
    case UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages.CONSTRUCTOR:
      return UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages.fromJson(
          json);
    default:
      return const UserPrivacySetting();
  }
}