fit_text 0.1.1
fit_text: ^0.1.1 copied to clipboard
Text that shrinks to fit its box, correctly. Works inside Expanded, Row, IntrinsicHeight and unbounded constraints, where LayoutBuilder-based auto-sizing gives up.
0.1.1 #
Packaging only — no API or behaviour changes.
- Added
.pubignore. Previous versions shipped the package's owntest/directory to everyone who depended on it.
0.1.0 #
Initial release.
FitTextandFitText.richshrink text to the largest size that fits, fitting inside a render object rather than aLayoutBuilder.- Works inside
IntrinsicHeight,IntrinsicWidth,Tablecells and baseline alignment, all of which measure children before laying them out and so throw forLayoutBuilder-based auto-sizing. FitTextGroupmakes several labels settle on one shared size.minFontSize,maxFontSize,stepGranularity, andpresetFontSizesfor staying on a type scale.- Both constructors are
const, likeText. overflowReplacementswaps in another widget when nothing fits, inside the same layout pass rather than a frame later.wrapWords: falsekeeps long words whole and shrinks until the longest fits.- Bisection over the candidate range: roughly six text layouts for the defaults rather than dozens.