utils_rinch_text
此方法會返回一個適合格式化長文本的 TextSpan 列表。此實作支援下列標籤,請參見範例。
- 星標
- 2
- 分支
- 0
- 最近推送(UTC)
- 2023年2月4日
- 專案狀態
- 未封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
This method returns a list of TextSpan ideal for formatting long text this implementation supports the following tags, see example.
<a>Link web<a>
<p> add paragraph
Add custom tags
Text de example:
String textExample = """
<i>Flutter<i> is an open source mobile app development framework <l>created by Google.<l>
It enables the creation of native apps for <i>iOS and Android<i> with a single Dart code base.
With its flexible and performant architecture, <o>Flutter has become one of the most
popular options for building mobile apps.<o> In addition, it offers a wide range of widgets
and animated visual effects that help you create attractive and intuitive applications. <p>
For more information about Flutter, head over to the main
page at <a>https://flutter.dev/<a> and start <b>exploring the possibilities<b>
of this powerful app development tool.
""";
Implementation
RichText(
text: TextSpan(
children: UtilsRinchText.generate(
textExample,
customTags: {
"<i>": const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
),
"<l>": const TextStyle(
fontSize: 20,
color: Colors.red,
fontWeight: FontWeight.bold,
),
"<a>": const TextStyle(
color: Colors.green,
fontWeight: FontWeight.bold,
),
"<o>": const TextStyle(
fontWeight: FontWeight.bold,
color: Colors.blue,
fontSize: 20,
),
"<b>": const TextStyle(
fontWeight: FontWeight.bold,
color: Colors.orange,
fontSize: 20,
),
},
),
),
),
語言C++CMakeDartHTMLCObjective-CJavaShellSwiftKotlin
使用的依賴
依賴清單 4 項
- flutter
{"sdk":"flutter"} - url_launcher
^6.1.8 - flutter_test開發依賴
{"sdk":"flutter"} - flutter_lints開發依賴
^2.0.0
如何選擇適合專案的儲存庫?
先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
- 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
- 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
- 使用前在 GitHub 確認 README、授權條款與 Issues。
來源與維護
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
