PublicChatType.fromJson constructor
a PublicChatType return type can be :
Implementation
factory PublicChatType.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case PublicChatTypeHasUsername.CONSTRUCTOR:
return PublicChatTypeHasUsername.fromJson(json);
case PublicChatTypeIsLocationBased.CONSTRUCTOR:
return PublicChatTypeIsLocationBased.fromJson(json);
default:
return const PublicChatType();
}
}