PageBlockPhoto.fromJson constructor

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

Parses a PageBlockPhoto from TDLib JSON.

Implementation

factory PageBlockPhoto.fromJson(Map<String, dynamic> json) => PageBlockPhoto(
  photo: _readOptional(json['photo'], Photo.fromJson),
  caption: _readOptional(json['caption'], PageBlockCaption.fromJson),
  url: _readString(json['url']),
  hasSpoiler: _readBool(json['has_spoiler']),
);