搜尋套件、儲存庫與 APP 分類

auto_hyphenating_text 封面
套件詳情v0.3.2

auto_hyphenating_text

一個自動添加連字號的文本組件。它被設計為預設文本組件的即插即用替代品。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2.8萬
喜歡數
37
Pub 分數
160

安裝套件

flutter pub add auto_hyphenating_text

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 小部件,可自動在文字中插入連字號以改善換行與可讀性,特別適用於窄版面。設計為標準 Text 小部件的直接取代品,可無縫整合至現有程式碼庫中,無需進行重大變更。該套件支援多個平台,並根據語言和上下文智慧處理連字號規則。

適用情境

  • 在窄容器中改進文本佈局
  • 增強兩端對齊文字的可讀性
  • 用連字符替代品取代預設的 Text 小部件
  • 支援多語言文字的正確連字
  • 在小螢幕上優化響應式UI

主要特色

  • 基於語言的自動連字
  • Text 小部件的即插即用取代品
  • 跨平台支援(Android、iOS、Web、macOS、Windows、Linux)
  • 可設定的連字行為
  • 所需的設定最少

適合對象

  • 包含密集文字內容的應用程式
  • 具有可變螢幕寬度的響應式設計
  • 多語言應用程式
  • 發佈或閱讀應用
  • 需要清晰排版的 UI

使用建議

  • 可能會略微增加渲染開銷
  • 連字的準確性取決於語言資料
  • 不適合非常短的文字字串
  • 連字點的自定義有限
  • 需要在所有目標平台進行仔細測試

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

AutoHyphenatingText is a drop in replacement for the default Text that supports autohyphenating text.

Demo

Usage

This package needs to be initialized using the following:

await initHyphenation();

This will load the hyphenation algorithm. You can skip this step if you manually initialized the hyphenation algorithm yourself.

Then it can be used as a drop in replacement for normal text. So

Text("abc");

becomes

AutoHyphenatingText("abc");

所屬分類

依賴

依賴清單 1 項

  • hyphenator_impure^0.1.1

原始碼儲存庫

使用此套件的專案

暫無相關資料。