Gifts.fromJson constructor

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

Creates a Gifts object from a JSON map.

Implementation

factory Gifts.fromJson(Map<String, dynamic> json) {
  return Gifts(
    gifts: List<Gift>.from(
      (json['gifts'] as List).map((gift) => Gift.fromJson(gift)),
    ),
  );
}