PaidMedia.preview constructor
- @Assert('type == PaidMediaType.preview', 'type must be PaidMediaType.preview')
- @Default(PaidMediaType.preview) @JsonKey(name: 'type') PaidMediaType type,
- @JsonKey(name: 'width') int? width,
- @JsonKey(name: 'height') int? height,
- @JsonKey(name: 'duration') int? duration,
Preview of paid media
Implementation
@Assert(
'type == PaidMediaType.preview',
'type must be PaidMediaType.preview',
)
const factory PaidMedia.preview({
/// Type of the paid media, must be "preview"
@Default(PaidMediaType.preview) @JsonKey(name: 'type') PaidMediaType type,
/// Optional. Media width as defined by the sender.
@JsonKey(name: 'width') final int? width,
/// Optional. Media height as defined by the sender.
@JsonKey(name: 'height') final int? height,
/// Optional. Duration of the media in seconds as defined by the sender.
@JsonKey(name: 'duration') final int? duration,
}) = PaidMediaPreview;