fromMap static method
override
Construct from Map.
Implementation
static MessageSponsorType? fromMap(Map<String, dynamic>? _map) {
if (_map == null) return null;
var _ = _map["@type"];
switch (_) {
case 'messageSponsorTypeWebsite':
return MessageSponsorTypeWebsite.fromMap(_map);
case 'messageSponsorTypePublicChannel':
return MessageSponsorTypePublicChannel.fromMap(_map);
case 'messageSponsorTypePrivateChannel':
return MessageSponsorTypePrivateChannel.fromMap(_map);
case 'messageSponsorTypeBot':
return MessageSponsorTypeBot.fromMap(_map);
case null:
default:
return null;
}
}