maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult reportSpam(
- ChatActionBarReportSpam value
- TResult inviteMembers()?,
- TResult reportAddBlock()?,
- TResult addContact(
- ChatActionBarAddContact value
- TResult joinRequest(
- ChatActionBarJoinRequest value
- TResult botInvite(
- ChatActionBarBotInvite value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(ChatActionBarReportSpam value)? reportSpam,
TResult Function(ChatActionBarInviteMembers value)? inviteMembers,
TResult Function(ChatActionBarReportAddBlock value)? reportAddBlock,
TResult Function(ChatActionBarAddContact value)? addContact,
TResult Function(ChatActionBarSharePhoneNumber value)? sharePhoneNumber,
TResult Function(ChatActionBarJoinRequest value)? joinRequest,
TResult Function(ChatActionBarBotInvite value)? botInvite,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case ChatActionBarReportSpam.constructor:
if (reportSpam != null) {
return reportSpam.call(this as ChatActionBarReportSpam);
}
break;
case ChatActionBarInviteMembers.constructor:
if (inviteMembers != null) {
return inviteMembers.call(this as ChatActionBarInviteMembers);
}
break;
case ChatActionBarReportAddBlock.constructor:
if (reportAddBlock != null) {
return reportAddBlock.call(this as ChatActionBarReportAddBlock);
}
break;
case ChatActionBarAddContact.constructor:
if (addContact != null) {
return addContact.call(this as ChatActionBarAddContact);
}
break;
case ChatActionBarSharePhoneNumber.constructor:
if (sharePhoneNumber != null) {
return sharePhoneNumber.call(this as ChatActionBarSharePhoneNumber);
}
break;
case ChatActionBarJoinRequest.constructor:
if (joinRequest != null) {
return joinRequest.call(this as ChatActionBarJoinRequest);
}
break;
case ChatActionBarBotInvite.constructor:
if (botInvite != null) {
return botInvite.call(this as ChatActionBarBotInvite);
}
break;
}
return orElse.call();
}