[英]How do I copy a web page including html tags to a Flutter app?
If I select part of a web page (like in the attached picture) and copy it to Microsoft Word, almost all the information will be displayed including the title, hyperlink, and image.如果我将 web 页面的 select 部分(如附图所示)复制到 Microsoft Word 中,将显示几乎所有信息,包括标题、超链接和图像。
But if I paste it to the Flutter app, only plain text is displayed.但如果我将其粘贴到 Flutter 应用程序中,则只显示纯文本。 So my question is how to copy those HTML tags to the Flutter app?
所以我的问题是如何将这些 HTML 标签复制到 Flutter 应用程序?
Thanks.谢谢。
You can use flutter_html package, you can find it on the this link => https://pub.dev/packages/flutter_html and this is how you can use it您可以使用flutter_html package,您可以在此链接上找到它=> https://pub.dev/packages/flutter_html这就是您可以使用它的方式
Future<void> showPrivacyPolicy(BuildContext context) async {
return showCupertinoModalBottomSheet(
context: context,
isDismissible: true,
builder: (context) => Material(
child: Column(
children: [
AppBar(
title: Text(
'PRIVACY POLICY',
style: TextStyle(color: Colors.white),
),
centerTitle: true,
backgroundColor: ceruleanTwo,
elevation: 0,
),
Expanded(
child: SingleChildScrollView(
child: Html(
data: privacyString,
),
),
),
],
),
),
);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.