RichBlock.document constructor

const RichBlock.document({
  1. @JsonKey.new(name: 'type') @Default.new(RichBlockType.document) RichBlockType type,
  2. @JsonKey.new(name: 'document') required Document 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 RichBlock.document({
  /// Type of the block, always "document"
  @JsonKey(name: 'type') @Default(RichBlockType.document) RichBlockType type,

  /// The document
  @JsonKey(name: 'document') required Document document,

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