RichBlockListItem constructor

const RichBlockListItem({
  1. @JsonKey.new(name: 'label') required String label,
  2. @JsonKey.new(name: 'blocks') required List<RichBlock> blocks,
  3. @JsonKey.new(name: 'has_checkbox') bool? hasCheckbox,
  4. @JsonKey.new(name: 'is_checked') bool? isChecked,
  5. @JsonKey.new(name: 'value') int? value,
  6. @JsonKey.new(name: 'type') String? type,
})

An item of a list.

Implementation

const factory RichBlockListItem({
  /// Label of the item
  @JsonKey(name: 'label') required String label,

  /// The content of the item
  @JsonKey(name: 'blocks') required List<RichBlock> blocks,

  /// Optional. True, if the item has a checkbox
  @JsonKey(name: 'has_checkbox') bool? hasCheckbox,

  /// Optional. True, if the item has a checked checkbox
  @JsonKey(name: 'is_checked') bool? isChecked,

  /// Optional. For ordered lists, the numeric value of the item label
  @JsonKey(name: 'value') int? value,

  /// Optional. For ordered lists, the type of the item label
  @JsonKey(name: 'type') String? type,
}) = _RichBlockListItem;