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