Lists
Lists support nested unordered (bullet) and ordered (numbered) hierarchies with full OOXML-grade numbering sequences, marker alignment, custom start numbers, continue/restart controls, and keyboard indentation.
- Included in:
writingConfiguration,notesConfiguration,documentConfiguration - Pure-Dart import:
package:vyuh_document_elements/list.dartorpackage:vyuh_document_elements/vyuh_document_elements.dart - Action namespace:
ListActions
Quick example
dart
import 'package:vyuh_document/vyuh_document.dart';
import 'package:vyuh_document_elements/vyuh_document_elements.dart';
final doc = Document.of(writingConfiguration, [
ListItem('Define canonical schema', ordered: true, level: 0),
ListItem('Verify round-trip codecs', ordered: true, level: 1),
ListItem('Ship release cohort', ordered: true, level: 0),
]);What you can configure
| Property | Type / Values | Purpose |
|---|---|---|
listId | String | Shared identity linking items into one continuous numbered or bulleted list |
level | int (0+) | Nesting depth controlled via Tab / Shift+Tab or Indent / Outdent |
marker | ListMarker | Bullet glyph or ordered numbering format (decimal, lower/upper alpha, lower/upper Roman) |
markerFormat | ListMarkerFormat (markerIndent, textIndent, alignment, follow) | Exact hanging indent, marker alignment (left, center, right), and tab/space follower |
numbering | ListNumberingSequence (startAt, levelText, levelStarts, levelTexts, levelStyles, legalLevels) | Custom start number (e.g. start at 5), multi-level templates (%1.%2.), and legal numbering |
paragraphFormat | ParagraphFormat | Spacing between items, line height, and alignment |
Actions & commands
| Action ID | Effect |
|---|---|
ListActions.bullet | Toggle bulleted list on the current selection |
ListActions.ordered | Toggle ordered (numbered) list on the current selection |
ListActions.indent | Increase list nesting depth by one level |
ListActions.outdent | Decrease list nesting depth (or exit list at level 0) |
- Commands:
Indent,Outdent,ToggleOrdered. - Markdown input rules: Typing
-,*, or1.at the start of a line converts the paragraph into a bullet or ordered list item.
Restricting usage
- Remove lists: Start from
paragraphsConfigurationor callwritingConfiguration.withoutElements([ListItem.element]). - Bullets only (disallow numbered lists): Omit
ListActions.orderedfrom yourActionGroupand gate it inDocumentPolicy.
Format parity
| DOCX | HTML | Markdown | |
|---|---|---|---|
Full word/numbering.xml multi-level lists, restarts, and indents | Exact marker geometry & hanging indents | Nested <ul> / <ol> with start attribute | - / 1. indented Markdown lists |