fit_text 0.1.1 copy "fit_text: ^0.1.1" to clipboard
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 own test/ directory to everyone who depended on it.

0.1.0 #

Initial release.

  • FitText and FitText.rich shrink text to the largest size that fits, fitting inside a render object rather than a LayoutBuilder.
  • Works inside IntrinsicHeight, IntrinsicWidth, Table cells and baseline alignment, all of which measure children before laying them out and so throw for LayoutBuilder-based auto-sizing.
  • FitTextGroup makes several labels settle on one shared size.
  • minFontSize, maxFontSize, stepGranularity, and presetFontSizes for staying on a type scale.
  • Both constructors are const, like Text.
  • overflowReplacement swaps in another widget when nothing fits, inside the same layout pass rather than a frame later.
  • wrapWords: false keeps long words whole and shrinks until the longest fits.
  • Bisection over the candidate range: roughly six text layouts for the defaults rather than dozens.
1
likes
160
points
37
downloads

Documentation

Documentation
API reference

Publisher

verified publisherjumyn.com

Weekly Downloads

Text that shrinks to fit its box, correctly. Works inside Expanded, Row, IntrinsicHeight and unbounded constraints, where LayoutBuilder-based auto-sizing gives up.

Repository (GitHub)
View/report issues

Topics

#text #layout #typography #responsive #ui

License

MIT (license)

Dependencies

flutter

More

Packages that depend on fit_text