fromJson static method
Implementation
static InputPhoto? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputPhoto(
photo: InputFile.fromJson(tdMapFromJson(json['photo'])),
thumbnail: InputThumbnail.fromJson(tdMapFromJson(json['thumbnail'])),
video: InputFile.fromJson(tdMapFromJson(json['video'])),
addedStickerFileIds: List<int>.from(
tdListFromJson(
json['added_sticker_file_ids'],
).map((item) => int.tryParse((item as dynamic)?.toString() ?? '') ?? 0),
),
width: (json['width'] as int?) ?? 0,
height: (json['height'] as int?) ?? 0,
);
}