MessageFileType.fromJson constructor

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

a MessageFileType return type can be :

Implementation

factory MessageFileType.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case MessageFileTypePrivate.CONSTRUCTOR:
      return MessageFileTypePrivate.fromJson(json);
    case MessageFileTypeGroup.CONSTRUCTOR:
      return MessageFileTypeGroup.fromJson(json);
    case MessageFileTypeUnknown.CONSTRUCTOR:
      return MessageFileTypeUnknown.fromJson(json);
    default:
      return const MessageFileType();
  }
}