ChatMembersFilter.fromJson constructor

ChatMembersFilter.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ChatMembersFilter.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case ChatMembersFilterContacts.CONSTRUCTOR:
      return ChatMembersFilterContacts.fromJson(json);
    case ChatMembersFilterAdministrators.CONSTRUCTOR:
      return ChatMembersFilterAdministrators.fromJson(json);
    case ChatMembersFilterMembers.CONSTRUCTOR:
      return ChatMembersFilterMembers.fromJson(json);
    case ChatMembersFilterMention.CONSTRUCTOR:
      return ChatMembersFilterMention.fromJson(json);
    case ChatMembersFilterRestricted.CONSTRUCTOR:
      return ChatMembersFilterRestricted.fromJson(json);
    case ChatMembersFilterBanned.CONSTRUCTOR:
      return ChatMembersFilterBanned.fromJson(json);
    case ChatMembersFilterBots.CONSTRUCTOR:
      return ChatMembersFilterBots.fromJson(json);
    default:
      return const ChatMembersFilter();
  }
}