markdown library

Markdown documents (.md).

MarkdownView shows a MarkdownController's document as a rendered preview, as highlighted source with line numbers, or both side by side.

Classes

DocumentController
What every format's controller does, so an app can build one toolbar, search bar and position display for all of them.
DocumentLocation
Where the reader is in a document: "page 3 of 12", "row 40 of 900".
DocumentSearchState
A search in a document: the query, how many times it occurs and which occurrence is current.
DocumentViewerStrings
The text the package's widgets show: messages, labels, tooltips and screen-reader descriptions. English by default.
DocumentViewerStringsScope
Gives the package's widgets below it strings instead of English.
DocumentViewerTheme
Colours the package's views use for search matches, as a ThemeExtension on the app's theme.
MarkdownController
A Markdown document for MarkdownView: it loads, decodes and searches the source like plain text (TextLinesController) and adds how it is shown.
MarkdownStats
Figures about a Markdown source, computed from the text alone (so every value is reliable). Fenced code is skipped when counting headings, links and images.
MarkdownView
Shows a MarkdownController's document as a rendered preview, as highlighted source with line numbers, or both side by side, as MarkdownController.viewMode says.
PositionKeys
Keys used in ReadingPosition maps, per reader.
TextLinesController
What the text formats (plain text, Markdown) share: decoding a file into lines, zoom, and case-insensitive search over those lines.
TextMatch
One occurrence of a search in a text document: on line line (from 0), starting at character start.

Enums

DocumentLoadError
Why a document couldn't be opened.
DocumentStatus
Where a DocumentController is in its document's life.
DocumentUnit
What DocumentLocation.current and DocumentLocation.count count.
MarkdownViewMode
How MarkdownView shows a document.

Typedefs

ReadingPosition = Map<String, Object?>
A reader's saved place in a document, as plain JSON-safe values.