fromJson static method
Inherited by: BotCommandScopeAllChatAdministrators BotCommandScopeAllGroupChats BotCommandScopeAllPrivateChats BotCommandScopeChat BotCommandScopeChatAdministrators BotCommandScopeChatMember BotCommandScopeDefault
Implementation
static BotCommandScope? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
switch (json['@type']) {
case BotCommandScopeAllChatAdministrators.constructor:
return BotCommandScopeAllChatAdministrators.fromJson(json);
case BotCommandScopeAllGroupChats.constructor:
return BotCommandScopeAllGroupChats.fromJson(json);
case BotCommandScopeAllPrivateChats.constructor:
return BotCommandScopeAllPrivateChats.fromJson(json);
case BotCommandScopeChat.constructor:
return BotCommandScopeChat.fromJson(json);
case BotCommandScopeChatAdministrators.constructor:
return BotCommandScopeChatAdministrators.fromJson(json);
case BotCommandScopeChatMember.constructor:
return BotCommandScopeChatMember.fromJson(json);
case BotCommandScopeDefault.constructor:
return BotCommandScopeDefault.fromJson(json);
default:
return null;
}
}