map<TResult extends Object?> method
TResult
map<TResult extends Object?>({
- required TResult allChatAdministrators(),
- required TResult allGroupChats(),
- required TResult allPrivateChats(),
- required TResult chat(
- BotCommandScopeChat value
- required TResult chatAdministrators(),
- required TResult chatMember(),
- required TResult $default(
- BotCommandScopeDefault value
Implementation
TResult map<TResult extends Object?>({
required TResult Function(BotCommandScopeAllChatAdministrators value)
allChatAdministrators,
required TResult Function(BotCommandScopeAllGroupChats value) allGroupChats,
required TResult Function(BotCommandScopeAllPrivateChats value)
allPrivateChats,
required TResult Function(BotCommandScopeChat value) chat,
required TResult Function(BotCommandScopeChatAdministrators value)
chatAdministrators,
required TResult Function(BotCommandScopeChatMember value) chatMember,
required TResult Function(BotCommandScopeDefault value) $default,
}) {
switch (getConstructor()) {
case BotCommandScopeAllChatAdministrators.constructor:
return allChatAdministrators.call(
this as BotCommandScopeAllChatAdministrators,
);
case BotCommandScopeAllGroupChats.constructor:
return allGroupChats.call(this as BotCommandScopeAllGroupChats);
case BotCommandScopeAllPrivateChats.constructor:
return allPrivateChats.call(this as BotCommandScopeAllPrivateChats);
case BotCommandScopeChat.constructor:
return chat.call(this as BotCommandScopeChat);
case BotCommandScopeChatAdministrators.constructor:
return chatAdministrators.call(
this as BotCommandScopeChatAdministrators,
);
case BotCommandScopeChatMember.constructor:
return chatMember.call(this as BotCommandScopeChatMember);
case BotCommandScopeDefault.constructor:
return $default.call(this as BotCommandScopeDefault);
}
throw StateError('not handled type Generator');
}