word_break_text
0.1.0, released 5 years ago by an unverified publisher
Text widget that adds word break support for CJK sentences.
What it does
It wraps a Text widget and inserts line breaks at word boundaries for Chinese, Japanese, and Korean text. The widget can be used as a drop‑in replacement for Text when CJK word breaking is required.
AI-written summary of version 0.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need to display CJK text that should wrap on word boundaries
- Target small screens where default Text wrapping is insufficient
- You want a lightweight, const‑constructible widget with no external dependencies
Skip it when
- Using only English or other languages that already wrap correctly
- Flutter later adds native CJK word break support
- You need advanced text styling beyond what Text offers
Strengths
- No external dependencies
- Supports const constructor
- Simple API, drop‑in replacement for Text
Weaknesses
- Only handles CJK text
- No support for other languages or advanced text features
- Unclear maintenance status
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Widget build(BuildContext context) {
return WordBreakText(
"헬로월드. 이것은 긴 문장입니다. 작은 화면에서 단어를 기준으로 줄바꿈이 되어야 합니다.",
spacingByWrap: true,
spacing: 4,
);
}Alternatives
Packages that do the same job and could replace word_break_text.
- re_editor
A lightweight text and code editor widget for Flutter with syntax highlighting and folding.
80Compare - find_in_page
An in-app find bar that highlights and scrolls to text matches, including lazy-list rows.
71Compare - optimal_wrap_text
A Text widget replacement that automatically finds optimal line breaks for balanced multi‑line text.
62Compare - see_more
Expandable text widget with trim, linkify, annotations, fade, and programmatic control
56Compare