create static method
BotCommandScope
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "botCommandScope",
- bool special_is_json_scheme_class = true,
- String special_return_type = "botCommandScope",
- BotCommandScopeDefault? bot_command_scope_default,
- BotCommandScopeAllPrivateChats? bot_command_scope_all_private_chats,
- BotCommandScopeAllGroupChats? bot_command_scope_all_group_chats,
- BotCommandScopeAllChatAdministrators? bot_command_scope_all_chat_administrators,
- BotCommandScopeChat? bot_command_scope_chat,
- BotCommandScopeChatAdministrators? bot_command_scope_chat_administrators,
- BotCommandScopeChatMember? bot_command_scope_chat_member,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static BotCommandScope create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "botCommandScope",
bool special_is_json_scheme_class = true,
String special_return_type = "botCommandScope",
BotCommandScopeDefault? bot_command_scope_default,
BotCommandScopeAllPrivateChats? bot_command_scope_all_private_chats,
BotCommandScopeAllGroupChats? bot_command_scope_all_group_chats,
BotCommandScopeAllChatAdministrators? bot_command_scope_all_chat_administrators,
BotCommandScopeChat? bot_command_scope_chat,
BotCommandScopeChatAdministrators? bot_command_scope_chat_administrators,
BotCommandScopeChatMember? bot_command_scope_chat_member,
}) {
// BotCommandScope botCommandScope = BotCommandScope({
final Map botCommandScope_data_create_json = {
"@type": special_type,
"@is_json_scheme_class": special_is_json_scheme_class,
"@return_type": special_return_type,
"bot_command_scope_default": (bot_command_scope_default != null) ? bot_command_scope_default.toJson() : null,
"bot_command_scope_all_private_chats": (bot_command_scope_all_private_chats != null) ? bot_command_scope_all_private_chats.toJson() : null,
"bot_command_scope_all_group_chats": (bot_command_scope_all_group_chats != null) ? bot_command_scope_all_group_chats.toJson() : null,
"bot_command_scope_all_chat_administrators": (bot_command_scope_all_chat_administrators != null) ? bot_command_scope_all_chat_administrators.toJson() : null,
"bot_command_scope_chat": (bot_command_scope_chat != null) ? bot_command_scope_chat.toJson() : null,
"bot_command_scope_chat_administrators": (bot_command_scope_chat_administrators != null) ? bot_command_scope_chat_administrators.toJson() : null,
"bot_command_scope_chat_member": (bot_command_scope_chat_member != null) ? bot_command_scope_chat_member.toJson() : null,
};
botCommandScope_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (botCommandScope_data_create_json.containsKey(key) == false) {
botCommandScope_data_create_json[key] = value;
}
});
}
return BotCommandScope(botCommandScope_data_create_json);
}