SupergroupMembersFilter.fromJson constructor

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

a SupergroupMembersFilter return type can be :

  • SupergroupMembersFilterRecent
  • SupergroupMembersFilterContacts
  • SupergroupMembersFilterAdministrators
  • SupergroupMembersFilterSearch
  • SupergroupMembersFilterRestricted
  • SupergroupMembersFilterBanned
  • SupergroupMembersFilterBots

Implementation

factory SupergroupMembersFilter.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case SupergroupMembersFilterRecent.CONSTRUCTOR:
      return SupergroupMembersFilterRecent.fromJson(json);
    case SupergroupMembersFilterContacts.CONSTRUCTOR:
      return SupergroupMembersFilterContacts.fromJson(json);
    case SupergroupMembersFilterAdministrators.CONSTRUCTOR:
      return SupergroupMembersFilterAdministrators.fromJson(json);
    case SupergroupMembersFilterSearch.CONSTRUCTOR:
      return SupergroupMembersFilterSearch.fromJson(json);
    case SupergroupMembersFilterRestricted.CONSTRUCTOR:
      return SupergroupMembersFilterRestricted.fromJson(json);
    case SupergroupMembersFilterBanned.CONSTRUCTOR:
      return SupergroupMembersFilterBanned.fromJson(json);
    case SupergroupMembersFilterBots.CONSTRUCTOR:
      return SupergroupMembersFilterBots.fromJson(json);
    default:
      return null;
  }
}