dart_balancer 0.3.0
dart_balancer: ^0.3.0 copied to clipboard
Text balancing widget with ratio control, RichText support, and Korean/CJK keepAll. Inspired by react-wrap-balancer.
0.3.0 #
Improvements #
- Set default
textAligntocenterfor all widgets (BalancedText, SafeBalancedText, BalancedRichText) - Ensure consistent alignment behavior across all text balancing widgets
Documentation #
- Add comprehensive widget comparison guide in README
- Add practical usage examples for each widget
- Clarify which widget to use for different scenarios
0.2.0 #
New Features #
- Add
SafeBalancedTextwidget: auto-sizing + text balancing combined - Implement
preventOrphanfor bothBalancedTextandBalancedRichText - Add RTL (right-to-left) text direction support
Improvements #
BalancedRichTextnow respectsalgorithmTypeoption (greedy/optimal)- Improve
keepAllto preserve consecutive spaces - Optimize cache invalidation in
SafeBalancedText - Use
MediaQuery.textScalerOffor better performance
Bug Fixes #
- Fix infinite loop in
GreedyAlgorithmwhen step is too small - Fix
BalancedRichTextminWidth calculation (was hardcoded 30%) - Fix cache not invalidating when widget properties change
0.1.1 #
- Fix: dry layout support for IntrinsicWidth, IntrinsicHeight, Showcase widgets
- Replace LayoutBuilder with custom RenderProxyBox to support computeDryLayout
0.1.0 #
- Initial release
- BalancedText widget with ratio control
- BalancedRichText for TextSpan support
- Korean/CJK keepAll (word-break prevention)
- Greedy and Optimal algorithms