RichBlock.list constructor

const RichBlock.list({
  1. @JsonKey.new(name: 'type') @Default.new(RichBlockType.list) RichBlockType type,
  2. @JsonKey.new(name: 'items') required List<RichBlockListItem> items,
})

A list of blocks, corresponding to the HTML tag <ul> or <ol> with multiple nested tags <li>.

Implementation

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

  /// Items of the list
  @JsonKey(name: 'items') required List<RichBlockListItem> items,
}) = RichBlockList;