text_component 2.0.0
text_component: ^2.0.0 copied to clipboard
A customizable Flutter widget for displaying text with advanced styling options such as font size, color, decoration, and more.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
2.0.0 - 2026-07-04 #
Added #
- Optimised text wrapping: new
optimisedTextparameter onTextComponent. When enabled, multi-line text wraps at a balanced width instead of leaving a short last line. - New
widthparameter to provide a fixed width for optimised wrapping in places whereLayoutBuildercannot measure (e.g. insideSliverFillRemaining). - New
OptimisedText,OptimisedRichText,OptimisedTextForWidth, andOptimisedRichTextForWidthwidgets powering the feature. maxLengthparameter to limit text to a character count, withshowEllipsisto control the trailing ellipsis.- Widget tests covering optimised wrapping, fixed width,
textAligndefault, andmaxLengthtruncation.
Changed #
- BREAKING: renamed the
optimalWrapparameter tooptimisedText, and theoptimal_wrappersource folder /OptimalWrap*widgets tooptimised_text/Optimised*. - When
optimisedTextis enabled,textAligndefaults toTextAlign.center. - Documented the optimised text wrapping and
maxLengthfeatures in the README.
1.0.0 YYYY-MM-DD #
Added #
- Initial release of the
text_componentpackage. TextComponentwidget to simplify text customization in Flutter projects.- Support for various
Textproperties, including:color,fontSize,fontWeight,fontStylemaxLines,overflow,textAlign,textDirection- Styling options like
backgroundColor,shadows,decoration, and more.
textScalarsupport for responsive text scaling.- Compatibility with Flutter's accessibility features (e.g.,
semanticsLabel,locale). - Customizable text overflow behavior and rich text decoration.
1.0.1 YYYY-MM-DD #
1.1.0 YYYY-MM-DD #
Added #
- Additional
TextStyleproperties support:fontFamilyFallback,textHeightBehavior,leadingDistribution
- New tests for
fontFamilyFallbackandoverflowbehavior.
Changed #
- Improved internal performance for faster widget rendering.
- Updated default
maxLinesbehavior to show unlimited lines when not specified.
1.1.1 YYYY-MM-DD #
Fixed #
- Resolved edge case where
backgroundColordid not render correctly. - Fixed an issue with
decorationThicknesswhen combined withshadows.
Notes for Contributors #
- Follow Semantic Versioning for version updates.
- Update the changelog with every new release.