fromJson static method
Inherited by: InputStoryContentPhoto InputStoryContentVideo
Implementation
static InputStoryContentVideo? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputStoryContentVideo(
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),
),
duration: ((json['duration'] as num?) ?? 0.0).toDouble(),
coverFrameTimestamp: ((json['cover_frame_timestamp'] as num?) ?? 0.0)
.toDouble(),
isAnimation: (json['is_animation'] as bool?) ?? false,
);
}