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.
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
The canonical home for this skill is thiennc-tesoglobal/flutter-skills
Render readable, predictable text across dynamic content lengths, locales, and accessibility settings.
Identify the failure mechanism before adjusting layout:
Text can receive an unbounded constraint along a Flex main axis and choose an intrinsic size larger than the space available beside its siblings, producing RenderFlex overflowed.ellipsis, fade).Text widgets in a Row break across lines awkwardly instead of flowing as a continuous paragraph.TextScaler) causes text to clip inside fixed-height containers or push critical actions offscreen.Text: In a Row, use Flexible, Expanded, SizedBox, or ConstrainedBox when text must share finite horizontal space with siblings. In a Column, 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.\u00A0) can bind the final two words of space-delimited headings, titles, and callouts. Do not apply that heuristic universally across locales.maxLines with TextOverflow.ellipsis, TextOverflow.fade, or TextOverflow.clip. Do not set softWrap: false without verifying whether single-line clipping is acceptable.Text.rich for inline styling: Prefer Text.rich for ambient style and text scaling when mixing weights, colors, inline badges (WidgetSpan), or link recognizers. Raw RichText needs deliberate span style and scaling, but can inherit ambient text direction.TextPainter when layout depends on copy size: When building dynamic chips, custom canvas callouts, or expandable "Read more" widgets, layout a TextPainter with explicit maxWidth plus the ambient direction, locale, and TextScaler to check rendered height and didExceedMaxLines.MediaQuery.textScalerOf(context)). Avoid hardcoded container heights around text; prefer flexible or scrollable containers.TextDirection).TextPainter measurements, or managing multi-line truncation.Exercise the text component with:
TextScaler.linear(1.5) and TextScaler.linear(2.0)).Write a widget test asserting no RenderFlex overflow, confirming intended line count, and verifying that truncation or non-breaking word pairing renders as expected.
thienqo/flutter-skills
a177189
Canonical home
since Sep 9, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.