RichBlock.animation constructor

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

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

Implementation

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

  /// The animation
  @JsonKey(name: 'animation') required Animation animation,

  /// 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,
}) = RichBlockAnimation;