RichBlock.video constructor

const RichBlock.video({
  1. @JsonKey.new(name: 'type') @Default.new(RichBlockType.video) RichBlockType type,
  2. @JsonKey.new(name: 'video') required Video video,
  3. @JsonKey.new(name: 'has_spoiler') bool? hasSpoiler,
  4. @JsonKey.new(name: 'caption') RichBlockCaption? caption,
})

A block with a video, corresponding to the HTML tag <video>.

Implementation

const factory RichBlock.video({
  /// Type of the block, always "video"
  @JsonKey(name: 'type') @Default(RichBlockType.video) RichBlockType type,

  /// The video
  @JsonKey(name: 'video') required Video video,

  /// Optional. True, if the media preview is covered by a spoiler animation
  @JsonKey(name: 'has_spoiler') bool? hasSpoiler,

  /// Optional. Caption of the block
  @JsonKey(name: 'caption') RichBlockCaption? caption,
}) = RichBlockVideo;