InputRichBlock.document constructor

const InputRichBlock.document({
  1. @JsonKey.new(name: 'type') @Default.new(RichBlockType.document) RichBlockType type,
  2. @JsonKey.new(name: 'document') required InputMediaDocument document,
  3. @JsonKey.new(name: 'caption') RichBlockCaption? caption,
})

A block with a general file, corresponding to the custom HTML tag <tg-document>.

Implementation

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

  /// The document. Caption is ignored.
  @JsonKey(name: 'document') required InputMediaDocument document,

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