Dividers
Dividers insert a horizontal thematic break between blocks with configurable stroke style, thickness, color, indents, and spacing above and below.
- Included in:
notesConfiguration,documentConfiguration - Pure-Dart import:
package:vyuh_document_elements/divider.dartorpackage:vyuh_document_elements/vyuh_document_elements.dart - Flutter extension:
DividerDocumentExtension(bundled inDocumentEditorElements.defaults) - Action namespace:
DividerActions
Quick example
dart
import 'package:vyuh_document/vyuh_document.dart';
import 'package:vyuh_document_elements/vyuh_document_elements.dart';
final doc = Document.of(notesConfiguration, [
Paragraph('Section one'),
Divider(thickness: 1.5),
Paragraph('Section two'),
]);What you can configure
DividerFormat
| Property | Type / Values | Purpose |
|---|---|---|
color | String? (hex) | Stroke color of the rule |
thickness | double (points) | Line height / stroke weight |
lineStyle | DocumentBorderStyle (solid, dashed, dotted, double, ...) | Stroke dash pattern |
spacingBefore, spacingAfter | double (points) | Vertical breathing room above and below the rule |
startIndent, endIndent | double (points) | Inset from left and right margins to create centered short rules |
Actions & commands
| Action ID | Effect |
|---|---|
DividerActions.insert | Insert a horizontal divider below the current block |
DividerActions.settings | Open the Divider properties inspector |
- Markdown input rule: Typing
---or***on an empty line converts it into a horizontal divider.
Restricting usage
- Remove dividers:
notesConfiguration.withoutElements([Divider.element])
Format parity
| DOCX | HTML | Markdown | |
|---|---|---|---|
| Paragraph bottom border preserving thickness, style, and color | Exact vector rule with dash pattern & indents | <hr> with style attributes | --- |