PriceOrId.fromJson constructor

PriceOrId.fromJson(
  1. Object? json
)

Implementation

factory PriceOrId.fromJson(Object? json) {
  if (json is String) {
    return PriceId(id: json);
  }
  return Price.fromJson(json);
}