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