mixin_markdown_widget 0.5.0
mixin_markdown_widget: ^0.5.0 copied to clipboard
A desktop-first Flutter Markdown reader widget with theming and streaming-friendly controller APIs.
Changelog #
0.5.0 #
Breaking changes #
- Require Flutter 3.47.0 / Dart 3.13.0 or later, and move from the deprecated
package:flutter/material.darttomaterial_ui. (#558) MarkdownThemeDatanow extends thematerial_uiThemeExtension, and the package readsTheme,TextSelectionTheme, and other Material ancestors frommaterial_ui. Flutter's legacy Material types are separate types, so register the theme in amaterial_uiThemeData(extensions: [...])and build the surroundingMaterialApp,Theme, andMaterialancestors withpackage:material_ui/material_ui.dart. See the README. (#558)
0.4.0 #
Breaking changes #
MarkdownContextMenuBuilderis nowWidget Function(BuildContext, MarkdownContextMenuDetails). The details carry the menuanchors, the defaultbuttonItems, theselectionController, thelinkDestinationunder the pointer, andhide.contextMenuBuildernow defaults todefaultMarkdownContextMenuBuilder, and passingnullshows no menu. See the README for an example. (#551)- Remove
MarkdownContextMenu. UsedefaultMarkdownContextMenuBuilderor build the menu fromMarkdownContextMenuDetails.buttonItems. (#551) - Deprecate
showCopyAllInContextMenuonMarkdownWidgetandMixinSelectionArea. FilterMarkdownContextMenuDetails.buttonItemsincontextMenuBuilderinstead. (#551)
Right-click menu #
- Right clicking keeps a selection under the pointer. Elsewhere, macOS and iOS select the word under the pointer and other platforms clear the selection. (#551)
- Show Copy only when text is selected, add Copy link over links, and remove Clear selection. (#551)
- Close the menu on Escape, scrolling, and any click.
MarkdownWidgetandMixinSelectionAreanow share the same menu behavior. (#551)
Selection #
- Double clicking Chinese and other non-ASCII text selects a dictionary word through
word_segmenter, and CJK punctuation ends a word. ASCII text keeps its rule. (#543, #550) - Fix double clicking the end of a table cell, quote paragraph, list item, or details summary selecting the word of the next cell or block. (#544)
- Fix
MixinSelectionAreaaround aMarkdownWidgetrebuilding on every frame. (#552)
Streaming #
- Add
MarkdownController.updateData, which appends when the new text extends the current data and parses in full otherwise. (#543) - Keep the streamed tail block and its nested blocks mounted across
appendChunk, so their state, code block scroll position, and caches survive each chunk. (#543) - Show the last highlight of a growing code block instead of flashing plain text, and run at most one highlight per block at a time. (#543)
- Fix link taps in cached list and quote rows using disposed recognizers, and keep the row cache when
onTapLinkis a new closure on each rebuild. (#543) - Deprecate the misspelled
MarkownWidgetalias andMarkdownDocumentParser.parseAppending, which ignores its previous document. (#543)
0.3.3 #
- Add
MarkdownController.parseDocumentand adocumentargument toMarkdownController, so an app can parse a document in an isolate before the widget builds. - Add
MarkdownController.highlightCodeBlocksandMarkdownController.cacheCodeHighlights, so an app can highlight the code blocks of a parsed document in an isolate. - Show cached code highlights in the first frame, instead of plain code followed by a rebuild of the document.
- Measure pretext text less: share width, line height, and tight text metrics measurements, measure each segment once per run, and merge plain fragments of a line.
0.3.2 #
- Hide HTML comments and GitHub review metadata in rendered and copied Markdown while preserving literal comments in code and escaped text.
- Preserve fallback text inside
relative-time,local-time, andtimeHTML elements. - Support self-closing HTML line breaks such as
<br/>, including inside expandable details. - Preserve source ranges and incremental streaming behavior around hidden HTML comments.
- Fix local images using absolute Windows paths being mistaken for URI schemes.
0.3.1 #
- mixin_markdown_widget: fix contextual inline styling
0.3.0 #
BREAKING CHANGE
- remove
MarkdownDocument.sourceTextfrom the public document model - add
MixinSelectionAreaand shared selection scope for composite selections - improve composite selection across quotes, lists, tables, and mixed selectable widgets
- improve inline code wrapping and decorated inline selection geometry
- improve incremental append parsing, footnote handling, and local image fallback
- add debug logging support and expand example and regression coverage
0.2.0 #
BREAKING CHANGE
- [mixin_markdown_widget]: improve text wrapping and boundary handling for decorated inline elements
- mixin_markdown_widget: improve block spacing logic and adjust theme defaults
- [mixin_markdown_widget]: improve code highlight cache with presentation signature
- [mixin_markdown_widget]: add horizontal scrolling support for wide tables and code blocks
- feat: enhance Markdown widget with new themes
- feat: add nested scrollable repaint listeners and viewport clipping for selection rects
- feat: add pub.dev metadata for mixin_markdown_widget
0.1.0 #
- Initial implementation