如何在 Flutter 中將字串轉換為 HTML 編碼的字串。
這是一個示例字串
This is the sample text & special character
also new line
我想這樣轉換
This is the sample text & special character <br> also new line
我不僅&想要所有可用的 HTML 物體。我發現到處都是 HTML 到字串,但在任何地方都找不到字串到 HTML!我想要html_unescape: 提供的反轉/相反功能!
uj5u.com熱心網友回復:
我想這就是你要找的:
https://api.flutter.dev/flutter/dart-convert/HtmlEscape-class.html
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/487759.html
上一篇:在Dart中直接使用列舉建構式
下一篇:yum安裝 一直出現There are no enabled repositories in “/etc/yum.repos.d“, “/etc/yum/repos.d“, 的解決辦法
