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