fromJson static method

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

Implementation

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

  return InputPaidMediaTypeVideo(
    cover: InputFile.fromJson(tdMapFromJson(json['cover'])),
    startTimestamp: (json['start_timestamp'] as int?) ?? 0,
    duration: (json['duration'] as int?) ?? 0,
    supportsStreaming: (json['supports_streaming'] as bool?) ?? false,
  );
}