MessageSponsorType.fromJson constructor
a MessageSponsorType return type can be :
Implementation
factory MessageSponsorType.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case MessageSponsorTypeBot.CONSTRUCTOR:
return MessageSponsorTypeBot.fromJson(json);
case MessageSponsorTypePublicChannel.CONSTRUCTOR:
return MessageSponsorTypePublicChannel.fromJson(json);
case MessageSponsorTypePrivateChannel.CONSTRUCTOR:
return MessageSponsorTypePrivateChannel.fromJson(json);
case MessageSponsorTypeWebsite.CONSTRUCTOR:
return MessageSponsorTypeWebsite.fromJson(json);
default:
return const MessageSponsorType();
}
}