DanXi
DanXi copied to clipboard
[BUG] 自由复制不能跨段复制
自由复制的功能是由 Markdown 控件支持的,可能得等待上游解决这个问题。
上游问题链接:https://github.com/flutter/flutter/issues/99819 。
There is actually a simple fix for this:
- Wrap everything you expect to be selectable in
SelectableArea - Override
MarkdownBody, it usesSelectableText.richto implement selection but it really should useText.richinstead.Text.rich(and alsoText) extendsSelectable, which automatically looks for a ancestorSelectableAreaand joins the group.
I have created a modified flutter_markdown package that does the job. Please try https://github.com/singularity-s0/flutter_markdown_selectable when you have time. Remember to wrap the entire renderer in SelectableArea.
Oops, a mindless click.