text_autosize 0.2.0 copy "text_autosize: ^0.2.0" to clipboard
text_autosize: ^0.2.0 copied to clipboard

Automatically resize text to fit its bounds: shrink the font until the text fits the available width, height and maxLines. TextScaler-aware, API-compatible with auto_size_text.

0.2.0 #

  • Add back a deprecated textScaleFactor parameter on AutoSizeText and AutoSizeText.rich. The 0.1.0 release dropped it, which broke the drop-in claim: any call site that set textScaleFactor failed to compile. It now compiles again and maps to TextScaler.linear(factor). Prefer textScaler; textScaleFactor is deprecated and will be removed later. Setting both asserts in debug builds.

0.1.3 #

  • Install instructions now say pub add instead of pinning a version. The pinned number was stale by several releases and would have been stale again after the next one: the README ships frozen in the archive, so a hand-edited version line is wrong the moment anything is published. This one cannot go out of date.

0.1.2 #

  • Docs: tightened the README wording and visuals.

0.1.1 #

  • Expand the package description to name what the package does in the words people search for. No code changes.

Changelog #

0.1.0 #

Initial release. The API follows auto_size_text 3.0.0, with these changes:

  • textScaler replaces textScaleFactor. The fitted font size accounts for the ambient MediaQuery scaler, including nonlinear scalers.
  • Rich text is measured with the fully resolved style, matching how Text.rich renders it.
  • Measurement resolves textAlign and textDirection like the rendered Text instead of assuming left-aligned, left-to-right text.
  • A single TextPainter is reused for all fit measurements of a widget.
  • textWidthBasis, textHeightBehavior and selectionColor are passed through to the built Text.
  • presetFontSizes are asserted to be in descending order.
0
likes
160
points
158
downloads
screenshot

Documentation

API reference

Publisher

verified publisherdeveloperyusuf.com

Weekly Downloads

Automatically resize text to fit its bounds: shrink the font until the text fits the available width, height and maxLines. TextScaler-aware, API-compatible with auto_size_text.

Repository (GitHub)
View/report issues

Topics

#text #autosize #typography #responsive #widget

License

MIT (license)

Dependencies

flutter

More

Packages that depend on text_autosize