Gift.fromJson constructor

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

Creates a Gift object from a JSON map.

Implementation

factory Gift.fromJson(Map<String, dynamic> json) {
  return Gift(
    id: json['id'],
    sticker: Sticker.fromJson(json['sticker']),
    starCount: json['star_count'],
    totalCount: json['total_count'],
    remainingCount: json['remaining_count'],
  );
}