BotCommandScope.fromJson constructor
a BotCommandScope return type can be :
Implementation
factory BotCommandScope.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case BotCommandScopeDefault.CONSTRUCTOR:
return BotCommandScopeDefault.fromJson(json);
case BotCommandScopeAllPrivateChats.CONSTRUCTOR:
return BotCommandScopeAllPrivateChats.fromJson(json);
case BotCommandScopeAllGroupChats.CONSTRUCTOR:
return BotCommandScopeAllGroupChats.fromJson(json);
case BotCommandScopeAllChatAdministrators.CONSTRUCTOR:
return BotCommandScopeAllChatAdministrators.fromJson(json);
case BotCommandScopeChat.CONSTRUCTOR:
return BotCommandScopeChat.fromJson(json);
case BotCommandScopeChatAdministrators.CONSTRUCTOR:
return BotCommandScopeChatAdministrators.fromJson(json);
case BotCommandScopeChatMember.CONSTRUCTOR:
return BotCommandScopeChatMember.fromJson(json);
default:
return const BotCommandScope();
}
}