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