fromJson static method

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

Implementation

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

  return GiftCollections(
    collections: List<GiftCollection>.from(
      tdListFromJson(json['collections'])
          .map((item) => GiftCollection.fromJson(tdMapFromJson(item)))
          .whereType<GiftCollection>(),
    ),
  );
}