fromJson static method

SuggestedPostPrice? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static SuggestedPostPrice? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case SuggestedPostPriceGram.constructor:
      return SuggestedPostPriceGram.fromJson(json);

    case SuggestedPostPriceStar.constructor:
      return SuggestedPostPriceStar.fromJson(json);

    default:
      return null;
  }
}