PromotionCodeOrId.fromJson constructor
PromotionCodeOrId.fromJson(
- Object? json
Implementation
factory PromotionCodeOrId.fromJson(Object? json) {
if (json is String) {
return PromotionCodeId(id: json);
}
return PromotionCode.fromJson(json);
}