dart_balancer 0.3.0 copy "dart_balancer: ^0.3.0" to clipboard
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 textAlign to center for 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 SafeBalancedText widget: auto-sizing + text balancing combined
  • Implement preventOrphan for both BalancedText and BalancedRichText
  • Add RTL (right-to-left) text direction support

Improvements #

  • BalancedRichText now respects algorithmType option (greedy/optimal)
  • Improve keepAll to preserve consecutive spaces
  • Optimize cache invalidation in SafeBalancedText
  • Use MediaQuery.textScalerOf for better performance

Bug Fixes #

  • Fix infinite loop in GreedyAlgorithm when step is too small
  • Fix BalancedRichText minWidth 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
1
likes
160
points
135
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Text balancing widget with ratio control, RichText support, and Korean/CJK keepAll. Inspired by react-wrap-balancer.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dart_balancer