PaidMediaInfo.fromJson constructor

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

Creates a PaidMediaInfo object from JSON.

Implementation

factory PaidMediaInfo.fromJson(Map<String, dynamic> json) {
  return PaidMediaInfo(
    starCount: json['star_count'],
    paidMedia: (json['paid_media'] as List)
        .map((item) => PaidMedia.fromJson(item))
        .toList(),
  );
}