fit_text 0.1.3
fit_text: ^0.1.3 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.3 #
Documentation only — no API changes.
- README code blocks now parse. Several listed variants one per line without terminating semicolons, so copying a block gave a syntax error even though each individual line was fine. Every snippet in this README is now checked through the analyser.
0.1.2 #
Documentation only.
- Adds a recording to the README and the pub.dev page: the same sentence in a
box that narrows from 460 to 150 pixels, with
FitTextabove and a plainTextbelow. At the narrow endFitTextstill shows every word andTextreads "The qui…".
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.