PaidMediaPhoto.fromJson constructor

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

Creates a PaidMediaPhoto object from JSON.

Implementation

factory PaidMediaPhoto.fromJson(Map<String, dynamic> json) {
  return PaidMediaPhoto(
    photo: (json['photo'] as List)
        .map((item) => PhotoSize.fromJson(item))
        .toList(),
  );
}