fromJson static method

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

Implementation

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

  return AvailableGift(
    gift: Gift.fromJson(tdMapFromJson(json['gift'])),
    resaleCount: (json['resale_count'] as int?) ?? 0,
    minResaleStarCount: (json['min_resale_star_count'] as int?) ?? 0,
    title: (json['title'] as String?) ?? '',
  );
}