maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult showStatus()?,
- TResult showProfilePhoto()?,
- TResult showLinkInForwardedMessages()?,
- TResult showPhoneNumber()?,
- TResult showBio()?,
- TResult showBirthdate()?,
- TResult showProfileAudio()?,
- TResult allowChatInvites()?,
- TResult allowCalls()?,
- TResult allowPeerToPeerCalls()?,
- TResult allowFindingByPhoneNumber()?,
- TResult allowPrivateVoiceAndVideoNoteMessages()?,
- TResult autosaveGifts()?,
- TResult allowUnpaidMessages()?,
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(UserPrivacySettingShowStatus value)? showStatus,
TResult Function(UserPrivacySettingShowProfilePhoto value)?
showProfilePhoto,
TResult Function(UserPrivacySettingShowLinkInForwardedMessages value)?
showLinkInForwardedMessages,
TResult Function(UserPrivacySettingShowPhoneNumber value)? showPhoneNumber,
TResult Function(UserPrivacySettingShowBio value)? showBio,
TResult Function(UserPrivacySettingShowBirthdate value)? showBirthdate,
TResult Function(UserPrivacySettingShowProfileAudio value)?
showProfileAudio,
TResult Function(UserPrivacySettingAllowChatInvites value)?
allowChatInvites,
TResult Function(UserPrivacySettingAllowCalls value)? allowCalls,
TResult Function(UserPrivacySettingAllowPeerToPeerCalls value)?
allowPeerToPeerCalls,
TResult Function(UserPrivacySettingAllowFindingByPhoneNumber value)?
allowFindingByPhoneNumber,
TResult Function(
UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages value)?
allowPrivateVoiceAndVideoNoteMessages,
TResult Function(UserPrivacySettingAutosaveGifts value)? autosaveGifts,
TResult Function(UserPrivacySettingAllowUnpaidMessages value)?
allowUnpaidMessages,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case UserPrivacySettingShowStatus.constructor:
if (showStatus != null) {
return showStatus.call(this as UserPrivacySettingShowStatus);
}
break;
case UserPrivacySettingShowProfilePhoto.constructor:
if (showProfilePhoto != null) {
return showProfilePhoto
.call(this as UserPrivacySettingShowProfilePhoto);
}
break;
case UserPrivacySettingShowLinkInForwardedMessages.constructor:
if (showLinkInForwardedMessages != null) {
return showLinkInForwardedMessages
.call(this as UserPrivacySettingShowLinkInForwardedMessages);
}
break;
case UserPrivacySettingShowPhoneNumber.constructor:
if (showPhoneNumber != null) {
return showPhoneNumber
.call(this as UserPrivacySettingShowPhoneNumber);
}
break;
case UserPrivacySettingShowBio.constructor:
if (showBio != null) {
return showBio.call(this as UserPrivacySettingShowBio);
}
break;
case UserPrivacySettingShowBirthdate.constructor:
if (showBirthdate != null) {
return showBirthdate.call(this as UserPrivacySettingShowBirthdate);
}
break;
case UserPrivacySettingShowProfileAudio.constructor:
if (showProfileAudio != null) {
return showProfileAudio
.call(this as UserPrivacySettingShowProfileAudio);
}
break;
case UserPrivacySettingAllowChatInvites.constructor:
if (allowChatInvites != null) {
return allowChatInvites
.call(this as UserPrivacySettingAllowChatInvites);
}
break;
case UserPrivacySettingAllowCalls.constructor:
if (allowCalls != null) {
return allowCalls.call(this as UserPrivacySettingAllowCalls);
}
break;
case UserPrivacySettingAllowPeerToPeerCalls.constructor:
if (allowPeerToPeerCalls != null) {
return allowPeerToPeerCalls
.call(this as UserPrivacySettingAllowPeerToPeerCalls);
}
break;
case UserPrivacySettingAllowFindingByPhoneNumber.constructor:
if (allowFindingByPhoneNumber != null) {
return allowFindingByPhoneNumber
.call(this as UserPrivacySettingAllowFindingByPhoneNumber);
}
break;
case UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages.constructor:
if (allowPrivateVoiceAndVideoNoteMessages != null) {
return allowPrivateVoiceAndVideoNoteMessages.call(
this as UserPrivacySettingAllowPrivateVoiceAndVideoNoteMessages);
}
break;
case UserPrivacySettingAutosaveGifts.constructor:
if (autosaveGifts != null) {
return autosaveGifts.call(this as UserPrivacySettingAutosaveGifts);
}
break;
case UserPrivacySettingAllowUnpaidMessages.constructor:
if (allowUnpaidMessages != null) {
return allowUnpaidMessages
.call(this as UserPrivacySettingAllowUnpaidMessages);
}
break;
}
return orElse.call();
}