RenderModel class final
The flat render model written by flark_parse, read through typed-data
views. Nothing is materialized until a host asks for it.
Every offset is a UTF-16 code unit of the source string. Records are
fixed-width words, some packing several fields; values only some kinds
carry sit in an extras section. Layout: header, lines, blocks, content
records, runs, definitions, run-extra index, extras, string table. See
native/flark_parse/SCHEMA.md.
Constructors
- RenderModel(Uint8List bytes)
-
Wraps
bytes; a view whose offset is not word-aligned is copied first, because the words are read through a Uint32List view. Both transports hand in fresh, aligned buffers, so the copy only happens for slices a host carved out of a larger buffer.factory
Properties
- blockCount → int
-
final
-
blocks
→ Iterable<
BlockView> -
no setter
- bytes → Uint8List
-
final
- contentCount → int
-
final
- definitionCount → int
-
final
-
definitions
→ Iterable<
DefinitionView> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- lineCount → int
-
final
- runCount → int
-
final
-
runs
→ Iterable<
RunView> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceBytes → int
-
final
- sourceUtf16 → int
-
final
Methods
-
blockAt(
int index) → BlockView -
blockAttr(
int index) → int - Heading level, fence length, list start number, item content column or table column count, by kind.
-
blockContentCount(
int index) → int -
blockContentOffset(
int index) → int -
Content records of block
indexareblockContentOffset(index)up toblockContentOffset(index) + blockContentCount(index). -
blockEnd(
int index) → int -
blockFirstLine(
int index) → int -
blockFlags(
int index) → int -
blockKind(
int index) → int -
blockLineCount(
int index) → int -
blockParent(
int index) → int - The parent block's index, or noParent for the document.
-
blockSourceOnly(
int index) → bool -
Whether block
indexshows its source because its runs were withheld. -
blockStart(
int index) → int -
codeInfoEnd(
int index) → int -
codeInfoStart(
int index) → int -
The info string of fenced code block
index; empty when it has none. -
contentEnd(
int index) → int -
contentLine(
int index) → int -
contentPrefixStart(
int index) → int -
contentStart(
int index) → int -
contentVirtualSpaces(
int index) → int -
definitionAt(
int index) → DefinitionView -
definitionDestinationEnd(
int index) → int -
definitionDestinationStart(
int index) → int -
definitionEnd(
int index) → int -
definitionLabelEnd(
int index) → int -
definitionLabelStart(
int index) → int -
definitionStart(
int index) → int -
displayOverride(
int index) → String? - Display text for a run whose content is not a source slice: replacement runs always, code runs with RunFlag.displayFromStrings.
-
firstRunOfBlock(
int blockIndex) → int -
Index of the first run whose block is at or after
blockIndex. Runs are contiguous per block in document order, so a block's runs arefirstRunOfBlock(b)up tofirstRunOfBlock(b + 1); a block without runs yields an empty range. -
footnoteLabelEnd(
int index) → int -
footnoteLabelStart(
int index) → int -
The label of footnote definition
index. -
footnoteRefLabelEnd(
int index) → int -
footnoteRefLabelStart(
int index) → int -
The label of footnote reference
index. -
itemMarkerEnd(
int index) → int -
End of item
index's first-line marker and padding, before any task checkbox. -
itemTaskEnd(
int index) → int -
itemTaskStart(
int index) → int -
The task symbol of item
index; zero unless it is a task item. -
lineOfUtf16(
int offset) → int -
Index of the line containing UTF-16 offset
offset(the last line for the end of the source). -
lineStartUtf16(
int line) → int -
linkDestination(
int index) → String - Comrak's resolved destination of a link, image or autolink, including references, escapes and entities.
-
linkDestinationEnd(
int index) → int -
linkDestinationStart(
int index) → int - Source range of a link or image destination (for a reference link, its label) or of an autolink's URL; empty when absent.
-
linkTitle(
int index) → String - Comrak's resolved title of a link or image.
-
linkTitleEnd(
int index) → int -
linkTitleStart(
int index) → int - Source range of a link or image title; empty when absent.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runAt(
int index) → RunView -
runBlock(
int index) → int -
The block that owns run
index. -
runContentEnd(
int index) → int -
runContentStart(
int index) → int -
runEnd(
int index) → int -
runFlags(
int index) → int -
runKind(
int index) → int -
runParent(
int index) → int - The parent run's index, or noParent.
-
runsOfBlock(
int blockIndex) → Iterable< RunView> -
The runs of block
blockIndex, possibly empty. -
runStart(
int index) → int -
string(
int offset, int length) → String - A string-table entry, used by replacement runs and display overrides.
-
tableAlignments(
int index) → int -
Column alignments of table
index, two bits per column from column 0. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited