PublicChatType.fromJson constructor

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

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();
  }
}