fromJson static method

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

Implementation

static TargetChat? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case TargetChatChosen.constructor:
      return TargetChatChosen.fromJson(json);

    case TargetChatCurrent.constructor:
      return TargetChatCurrent.fromJson(json);

    case TargetChatInternalLink.constructor:
      return TargetChatInternalLink.fromJson(json);

    default:
      return null;
  }
}