TopChatCategory.fromJson constructor
a TopChatCategory return type can be :
Implementation
factory TopChatCategory.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case TopChatCategoryUsers.CONSTRUCTOR:
return TopChatCategoryUsers.fromJson(json);
case TopChatCategoryBots.CONSTRUCTOR:
return TopChatCategoryBots.fromJson(json);
case TopChatCategoryGroups.CONSTRUCTOR:
return TopChatCategoryGroups.fromJson(json);
case TopChatCategoryChannels.CONSTRUCTOR:
return TopChatCategoryChannels.fromJson(json);
case TopChatCategoryInlineBots.CONSTRUCTOR:
return TopChatCategoryInlineBots.fromJson(json);
case TopChatCategoryCalls.CONSTRUCTOR:
return TopChatCategoryCalls.fromJson(json);
case TopChatCategoryForwardChats.CONSTRUCTOR:
return TopChatCategoryForwardChats.fromJson(json);
default:
return const TopChatCategory();
}
}