fromJson static method
Inherited by: UserPrivacySettingAllowCalls UserPrivacySettingAllowChatInvites UserPrivacySettingAllowFindingByPhoneNumber UserPrivacySettingAllowPeerToPeerCalls UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages UserPrivacySettingAllowUnpaidMessages UserPrivacySettingAutosaveGifts UserPrivacySettingShowBio UserPrivacySettingShowBirthdate UserPrivacySettingShowLinkInForwardedMessages UserPrivacySettingShowPhoneNumber UserPrivacySettingShowProfileAudio UserPrivacySettingShowProfilePhoto UserPrivacySettingShowStatus
Implementation
static UserPrivacySetting? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
switch (json['@type']) {
case UserPrivacySettingAllowCalls.constructor:
return UserPrivacySettingAllowCalls.fromJson(json);
case UserPrivacySettingAllowChatInvites.constructor:
return UserPrivacySettingAllowChatInvites.fromJson(json);
case UserPrivacySettingAllowFindingByPhoneNumber.constructor:
return UserPrivacySettingAllowFindingByPhoneNumber.fromJson(json);
case UserPrivacySettingAllowPeerToPeerCalls.constructor:
return UserPrivacySettingAllowPeerToPeerCalls.fromJson(json);
case UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages.constructor:
return UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages.fromJson(
json,
);
case UserPrivacySettingAllowUnpaidMessages.constructor:
return UserPrivacySettingAllowUnpaidMessages.fromJson(json);
case UserPrivacySettingAutosaveGifts.constructor:
return UserPrivacySettingAutosaveGifts.fromJson(json);
case UserPrivacySettingShowBio.constructor:
return UserPrivacySettingShowBio.fromJson(json);
case UserPrivacySettingShowBirthdate.constructor:
return UserPrivacySettingShowBirthdate.fromJson(json);
case UserPrivacySettingShowLinkInForwardedMessages.constructor:
return UserPrivacySettingShowLinkInForwardedMessages.fromJson(json);
case UserPrivacySettingShowPhoneNumber.constructor:
return UserPrivacySettingShowPhoneNumber.fromJson(json);
case UserPrivacySettingShowProfileAudio.constructor:
return UserPrivacySettingShowProfileAudio.fromJson(json);
case UserPrivacySettingShowProfilePhoto.constructor:
return UserPrivacySettingShowProfilePhoto.fromJson(json);
case UserPrivacySettingShowStatus.constructor:
return UserPrivacySettingShowStatus.fromJson(json);
default:
return null;
}
}