fromJson static method

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

Implementation

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

  return AvailableGifts(
    gifts: List<AvailableGift>.from(
      tdListFromJson(json['gifts'])
          .map((item) => AvailableGift.fromJson(tdMapFromJson(item)))
          .whereType<AvailableGift>(),
    ),
  );
}