TargetChat.fromJson constructor

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

a TargetChat return type can be :

Implementation

factory TargetChat.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case TargetChatCurrent.CONSTRUCTOR:
      return TargetChatCurrent.fromJson(json);
    case TargetChatChosen.CONSTRUCTOR:
      return TargetChatChosen.fromJson(json);
    case TargetChatInternalLink.CONSTRUCTOR:
      return TargetChatInternalLink.fromJson(json);
    default:
      return const TargetChat();
  }
}