MessageForwardOrigin.fromJson constructor

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

Implementation

factory MessageForwardOrigin.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case MessageForwardOriginUser.CONSTRUCTOR:
      return MessageForwardOriginUser.fromJson(json);
    case MessageForwardOriginChat.CONSTRUCTOR:
      return MessageForwardOriginChat.fromJson(json);
    case MessageForwardOriginHiddenUser.CONSTRUCTOR:
      return MessageForwardOriginHiddenUser.fromJson(json);
    case MessageForwardOriginChannel.CONSTRUCTOR:
      return MessageForwardOriginChannel.fromJson(json);
    case MessageForwardOriginMessageImport.CONSTRUCTOR:
      return MessageForwardOriginMessageImport.fromJson(json);
    default:
      return const MessageForwardOrigin();
  }
}