fromJson static method
Inherited by: AffiliateTypeBot AffiliateTypeChannel AffiliateTypeCurrentUser
Implementation
static AffiliateType? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
switch (json['@type']) {
case AffiliateTypeBot.constructor:
return AffiliateTypeBot.fromJson(json);
case AffiliateTypeChannel.constructor:
return AffiliateTypeChannel.fromJson(json);
case AffiliateTypeCurrentUser.constructor:
return AffiliateTypeCurrentUser.fromJson(json);
default:
return null;
}
}