text_autosize 0.1.0
text_autosize: ^0.1.0 copied to clipboard
Automatically resize text to fit its bounds. TextScaler-aware, API-compatible with auto_size_text.
Changelog #
0.1.0 #
Initial release. The API follows auto_size_text 3.0.0, with these changes:
textScalerreplacestextScaleFactor. The fitted font size accounts for the ambientMediaQueryscaler, including nonlinear scalers.- Rich text is measured with the fully resolved style, matching how
Text.richrenders it. - Measurement resolves
textAlignandtextDirectionlike the renderedTextinstead of assuming left-aligned, left-to-right text. - A single
TextPainteris reused for all fit measurements of a widget. textWidthBasis,textHeightBehaviorandselectionColorare passed through to the builtText.presetFontSizesare asserted to be in descending order.