auto_size_text_plus
3.0.2, released 2 years ago by siro.co.ke
Flutter widget that automatically resizes text to fit within its bounds.
WASM-ready
What it does
AutoSizeText behaves like a standard Text widget, but automatically adjusts the font size to fit perfectly within its constraints. It supports minimum and maximum font sizes, group synchronization, preset font sizes, and rich text.
AI-written summary of version 3.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need text to shrink to fit a specific container without overflowing
- You want to synchronize the font size across multiple text widgets
- You need rich text formatting with automatic resizing capabilities
Skip it when
- The text widget is placed inside unconstrained parents like a plain Row or Column without proper layout wrappers like Expanded
- You do not need dynamic resizing and standard Text widgets suffice
Strengths
- Seamless drop-in replacement for standard Text and Text.rich widgets
- Supports synchronizing multiple text sizes via AutoSizeGroup
- Performs well and offers extensive parameter control like stepGranularity and presetFontSizes
Weaknesses
- Requires proper bounded constraints to calculate scaling properly, which can cause overflow if improperly wrapped
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
AutoSizeText(
'The text to display',
style: TextStyle(fontSize: 20),
maxLines: 2,
)Alternatives
Packages that do the same job and could replace auto_size_text_plus.
- auto_size_text
The original package version if you prefer it over the plus variant.
50Compare