ol function

Component ol(
  1. List<Component> children, {
  2. bool? reversed,
  3. int? start,
  4. NumberingType? type,
  5. Key? key,
  6. String? id,
  7. String? classes,
  8. Styles? styles,
  9. Map<String, String>? attributes,
  10. Map<String, EventCallback>? events,
})

The <ol> HTML element represents an ordered list of items — typically rendered as a numbered list.

  • reversed: This Boolean attribute specifies that the list's items are in reverse order. Items will be numbered from high to low.
  • start: An integer to start counting from for the list items. Always an Arabic numeral (1, 2, 3, etc.), even when the numbering type is letters or Roman numerals. For example, to start numbering elements from the letter "d" or the Roman numeral "iv," use start="4".
  • type: Sets the numbering type. The specified type is used for the entire list unless a different type attribute is used on an enclosed <li> element.

Implementation

Component ol(List<Component> children,
    {bool? reversed,
    int? start,
    NumberingType? type,
    Key? key,
    String? id,
    String? classes,
    Styles? styles,
    Map<String, String>? attributes,
    Map<String, EventCallback>? events}) {
  return DomComponent(
    tag: 'ol',
    key: key,
    id: id,
    classes: classes,
    styles: styles,
    attributes: {
      ...attributes ?? {},
      if (reversed == true) 'reversed': '',
      if (start != null) 'start': '$start',
      if (type != null) 'type': type.value,
    },
    events: events,
    children: children,
  );
}