Skip to content

Add Design Doc for Composable Text Plugins in Flutter - #35

Open
hannah-hyj wants to merge 2 commits into
flutter:mainfrom
hannah-hyj:main
Open

hannah-hyj wants to merge 2 commits into
flutter:mainfrom
hannah-hyj:main

Conversation

@hannah-hyj

@hannah-hyj hannah-hyj commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Demo app: https://hannah-hyj.github.io/flutter_text_plugin_demo/
issue: flutter/flutter#65504
Prototype Branch: hannah-hyj/flutter@text-plugin-testing
#25 was closed in favor of this one

Summary

Proposes a composable text plugin architecture (TextPluginScope, TextPlugin, and TextDelegate) in package:flutter/rendering.dart and package:flutter/widgets.dart.

This enables cross-cutting text inspection, background/foreground decoration painting, pointer gesture handling, and scroll-to-range across standard Text, RichText, and EditableText (TextField) subtrees (RenderParagraph and RenderEditable) without requiring custom text widgets or TextSpan wrappers.

Key Use Cases

  • In-page find & highlight (Ctrl+F) across lazy scrollables (ListView.builder) and text fields
  • Non-intrusive inline annotations, spellcheck/grammar squiggles, and interactive token tooltips
  • Accessibility and localization auditing overlays (e.g., text truncation, contrast, and scaling diagnostics)

Pre-launch Checklist

  • I read RFC 000.0001: Taxonomy and followed the file and path naming and metadata standards.
  • I read RFC 000.0002: Process and confirmed this proposal meets the threshold for a full RFC.
  • I read and agree to the Code of Conduct.
  • I signed the CLA.
  • I have linked an issue from flutter/flutter with the label design doc.
  • All existing and new tests are passing.
  • I have enabled "Allow edits from maintainers" on this PR so the bot can automatically assign an RFC number (or I will run dart run bin/assign_rfc_number.dart locally when instructed).

If you need help, consider asking for advice on the #hackers channel on Discord.

@hannah-hyj hannah-hyj changed the title RFC 170.0000: Composable Text Plugins in Flutter Add Design Composable Text Plugins in Flutter Oct 15, 2026
@hannah-hyj hannah-hyj changed the title Add Design Composable Text Plugins in Flutter Add Design Doc for Composable Text Plugins in Flutter Oct 15, 2026
@fanchou

This comment was marked as resolved.

@hannah-hyj

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants