fromJson static method

InputPageBlockPhoto? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static InputPageBlockPhoto? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return InputPageBlockPhoto(
    photo: InputPhoto.fromJson(tdMapFromJson(json['photo'])),
    caption: PageBlockCaption.fromJson(tdMapFromJson(json['caption'])),
    hasSpoiler: (json['has_spoiler'] as bool?) ?? false,
  );
}