fromMap static method

UserPrivacySetting? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static UserPrivacySetting? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'userPrivacySettingAllowCalls':
      return UserPrivacySettingAllowCalls.fromMap(_map);
    case 'userPrivacySettingShowProfilePhoto':
      return UserPrivacySettingShowProfilePhoto.fromMap(_map);
    case 'userPrivacySettingShowLinkInForwardedMessages':
      return UserPrivacySettingShowLinkInForwardedMessages.fromMap(_map);
    case 'userPrivacySettingShowStatus':
      return UserPrivacySettingShowStatus.fromMap(_map);
    case 'userPrivacySettingAllowPeerToPeerCalls':
      return UserPrivacySettingAllowPeerToPeerCalls.fromMap(_map);
    case 'userPrivacySettingAllowFindingByPhoneNumber':
      return UserPrivacySettingAllowFindingByPhoneNumber.fromMap(_map);
    case 'userPrivacySettingShowPhoneNumber':
      return UserPrivacySettingShowPhoneNumber.fromMap(_map);
    case 'userPrivacySettingAllowChatInvites':
      return UserPrivacySettingAllowChatInvites.fromMap(_map);
    case 'userPrivacySettingShowBio':
      return UserPrivacySettingShowBio.fromMap(_map);
    case 'userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages':
      return UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages.fromMap(
          _map);
    case null:
    default:
      return null;
  }
}