NeomDocxService class
Static service for converting Markdown to DOCX bytes.
DOCX is an OOXML format = ZIP of XML files.
Uses the archive package (transitive dependency) to build the ZIP.
Minimal valid DOCX structure:
Content_Types.xml — content type declarations (static)
_rels/.rels — root relationships (static)
word/_rels/document.xml.rels — document relationships (static)
word/styles.xml — Heading1/2/3, Normal, Bold styles (static)
word/document.xml — THE CONTENT (dynamic — generated from markdown)
Pattern: stateless, no DI needed. Reusable across the Neom ecosystem.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
extractText(
Uint8List bytes) → String - Extract plain text from DOCX bytes.
-
generateFromMarkdown(
{required String content, String title = 'Documento'}) → Uint8List - Convert markdown content to DOCX bytes.
-
suggestFilename(
String content, {String prefix = 'neom'}) → String - Suggest a filename from the markdown content.