fromJson static method

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

Implementation

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

  return LinkPreviewTypeVideo(
    video: Video.fromJson(tdMapFromJson(json['video'])),
    cover: Photo.fromJson(tdMapFromJson(json['cover'])),
    startTimestamp: (json['start_timestamp'] as int?) ?? 0,
  );
}