flutter-text-rendering
Skill16 starsChanged 2 months agoBSD-3-ClauseView on GitHub
Diagnose and fix Flutter text display issues including text overflow, orphaned words, line breaking, truncation, multi-style spans, and text scaling. Use when text clips, leaves dangling single words, overflows containers, or requires rich inline spans; route typography tokens and visual hierarchy to flutter-ui-design and screen-level layout constraints to flutter-responsive-layout.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- thiennc-tesoglobal/flutter-skillsword for word, first seen Aug 30, 2026
Other versions1 project uses a version of this.
Word for word · 1
- thiennc-tesoglobal/flutter-skills★ 16100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- dart-concurrencySkill
- dart-languageSkill
- flutter-accessibilitySkill
- flutter-ai-integrationSkill
- flutter-animationSkill
- flutter-app-workflowSkill
- flutter-architectureSkill
- flutter-authenticationSkill
- flutter-background-executionSkill
- flutter-build-releaseSkill
- flutter-ci-cdSkill
- flutter-code-reviewSkill
- flutter-dependency-upgradesSkill
- flutter-device-testingSkill
- flutter-figma-workflowSkill
- flutter-in-app-purchasesSkill
- flutter-localizationSkill
- flutter-mediaSkill
- flutter-navigationSkill
- flutter-networkingSkill
- flutter-notificationsSkill
- flutter-observabilitySkill
- flutter-openapi-clientSkill
- flutter-package-developmentSkill
- flutter-performanceSkill
- flutter-persistenceSkill
- flutter-platform-integrationSkill
- flutter-product-analyticsSkill
- flutter-responsive-layoutSkill
- flutter-runtime-debuggingSkill
- flutter-securitySkill
- flutter-state-managementSkill
- flutter-testingSkill
- flutter-ui-designSkill
- flutter-ui-patternsSkill
- flutter-visual-effectsSkill
- flutter-webviewSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Use
Text.richfor inline styling: Prefer Text.rich for ambient style and text scaling when mixing weights, colors, inline badges … - Very specific: line 32
Read text overflow and wrapping when fixing flex overflows, eliminating orphaned words with non-breaking spaces, configuring TextPainter …
- Very specific: line 43
Write a widget test asserting no RenderFlex overflow, confirming intended line count, and verifying that truncation or non-breaking word …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter Text Rendering
Render readable, predictable text across dynamic content lengths, locales, and accessibility settings.
Diagnose
Identify the failure mechanism before adjusting layout:
- Main-axis flex overflow: A non-flex
Textcan receive an unbounded constraint along aFlexmain axis and choose an intrinsic size larger than the space available beside its siblings, producingRenderFlex overflowed. - Orphaned words (widows): The last word of a headline or paragraph dangles alone on a new line because line breaking occurred at the final whitespace.
- Uncontrolled truncation: Text clips silently or exceeds intended lines without a visible truncation affordance (
ellipsis,fade). - Broken inline flow: Multiple adjacent
Textwidgets in aRowbreak across lines awkwardly instead of flowing as a continuous paragraph. - Text scale breakage: Enlarged system font scale (
TextScaler) causes text to clip inside fixed-height containers or push critical actions offscreen.
Rules
- Constrain the competing branch, not every
Text: In aRow, useFlexible,Expanded,SizedBox, orConstrainedBoxwhen text must share finite horizontal space with siblings. In aColumn, flex changes vertical allocation and is not a default fix for horizontal text overflow. Never add a flex child when the parent's main-axis constraint is unbounded. - Prevent orphaned words only where segmentation fits: A non-breaking space (
\u00A0) can bind the final two words of space-delimited headings, titles, and callouts. Do not apply that heuristic universally across locales. - Choose wrapping or truncation deliberately: Allow natural wrapping when the full copy matters. When the product contract calls for truncation, pair an explicit
maxLineswithTextOverflow.ellipsis,TextOverflow.fade, orTextOverflow.clip. Do not setsoftWrap: falsewithout verifying whether single-line clipping is acceptable. - Use
Text.richfor inline styling: PreferText.richfor ambient style and text scaling when mixing weights, colors, inline badges (WidgetSpan), or link recognizers. RawRichTextneeds deliberate span style and scaling, but can inherit ambient text direction. - Measure text with
TextPainterwhen layout depends on copy size: When building dynamic chips, custom canvas callouts, or expandable "Read more" widgets, layout aTextPainterwith explicitmaxWidthplus the ambient direction, locale, andTextScalerto check rendered height anddidExceedMaxLines. - Adapt to text scaling: Support enlarged system fonts (
MediaQuery.textScalerOf(context)). Avoid hardcoded container heights around text; prefer flexible or scrollable containers. - Account for internationalization: Design copy containers to tolerate 20–35% text length expansion for localized strings and support bidirectional text (
TextDirection).
Conditional references
- Read text overflow and wrapping when fixing flex overflows, eliminating orphaned words with non-breaking spaces, configuring
TextPaintermeasurements, or managing multi-line truncation.
Verification
Exercise the text component with:
- Minimum length copy (empty or single short word).
- Realistic expected copy.
- Maximum length / localized copy (including accented and long non-whitespace strings).
- Enlarged font scaling (
TextScaler.linear(1.5)andTextScaler.linear(2.0)). - Constrained parent widths (narrow mobile screens, tight cards, list items).
Write a widget test asserting no RenderFlex overflow, confirming intended line count, and verifying that truncation or non-breaking word pairing renders as expected.
Sources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

