RichBlock.details constructor

const RichBlock.details({
  1. @JsonKey.new(name: 'type') @Default.new(RichBlockType.details) RichBlockType type,
  2. @JsonKey.new(name: 'summary') @RichTextConverter() required RichText summary,
  3. @JsonKey.new(name: 'blocks') required List<RichBlock> blocks,
  4. @JsonKey.new(name: 'is_open') bool? isOpen,
})

An expandable block for details disclosure, corresponding to the HTML tag <details>.

Implementation

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

  /// Always shown summary of the block
  @JsonKey(name: 'summary') @RichTextConverter() required RichText summary,

  /// Content of the block
  @JsonKey(name: 'blocks') required List<RichBlock> blocks,

  /// Optional. True, if the content of the block is visible by default
  @JsonKey(name: 'is_open') bool? isOpen,
}) = RichBlockDetails;