Video constructor
const
Video({
- @JsonKey.new(name: 'file_id') required String fileId,
- @JsonKey.new(name: 'file_unique_id') required String fileUniqueId,
- @JsonKey.new(name: 'width') required int width,
- @JsonKey.new(name: 'height') required int height,
- @JsonKey.new(name: 'duration') required int duration,
- @JsonKey.new(name: 'thumbnail') PhotoSize? thumbnail,
- @JsonKey.new(name: 'file_name') String? fileName,
- @JsonKey.new(name: 'mime_type') String? mimeType,
- @JsonKey.new(name: 'file_size') int? fileSize,
- @JsonKey.new(name: 'start_timestamp') int? startTimestamp,
- @JsonKey.new(name: 'cover') List<
PhotoSize> ? cover,
Creates a video file
fileIdIdentifier for this file, which can be used to download or reuse the filefileUniqueIdUnique identifier for this filewidthVideo width as defined by senderheightVideo height as defined by senderdurationDuration of the video in seconds as defined by senderthumbnailAnimation thumbnail as defined by senderfileNameOriginal animation filename as defined by sendermimeTypeMIME type of the file as defined by senderfileSizeFile size in bytesstartTimestampTimestamp in seconds from which the video will playcoverAvailable sizes of the cover of the video
Implementation
const factory Video({
/// Identifier for this file, which can be used to download or reuse the
/// file
@JsonKey(name: 'file_id') required String fileId,
/// Unique identifier for this file, which is supposed to be the same over
/// time and for different bots. Can't be used to download or reuse the
/// file.
@JsonKey(name: 'file_unique_id') required String fileUniqueId,
/// Video width as defined by sender
@JsonKey(name: 'width') required int width,
/// Video height as defined by sender
@JsonKey(name: 'height') required int height,
/// Duration of the video in seconds as defined by sender
///
/// A handy [Duration] getter is available as `durationTime`
@JsonKey(name: 'duration') required int duration,
/// Optional. Animation thumbnail as defined by sender
@JsonKey(name: 'thumbnail') PhotoSize? thumbnail,
/// Optional. Original animation filename as defined by sender
@JsonKey(name: 'file_name') String? fileName,
/// Optional. MIME type of the file as defined by sender
@JsonKey(name: 'mime_type') String? mimeType,
/// Optional. File size in bytes. It can be bigger than 2^31 and some
/// programming languages may have difficulty/silent defects in interpreting
/// it. But it has at most 52 significant bits, so a signed 64-bit integer
/// or double-precision float type are safe for storing this value.
@JsonKey(name: 'file_size') int? fileSize,
/// Optional. Timestamp in seconds from which the video will play in the
/// message
@JsonKey(name: 'start_timestamp') int? startTimestamp,
/// Optional. Available sizes of the cover of the video in the message
@JsonKey(name: 'cover') List<PhotoSize>? cover,
}) = _Video;