fromJson static method

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

Implementation

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

  return PremiumLimit(
    type: PremiumLimitType.fromJson(tdMapFromJson(json['type'])),
    defaultValue: (json['default_value'] as int?) ?? 0,
    premiumValue: (json['premium_value'] as int?) ?? 0,
  );
}