flutter解析html代码
html嵌入flutter使用flutter_html插件flutter_html: ^1.2.0版本class _NoticeDetailState extends State<NoticeDetail> {@overrideWidget build(BuildContext context) {return Scaffold(appBar: CustomWidgets.appBar
·
html嵌入flutter
使用flutter_html插件
flutter_html: ^1.2.0版本
class _NoticeDetailState extends State<NoticeDetail> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomWidgets.appBarWhite(context, '详情'),
body: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Html(
data: """
<p>有图片的<img src="http://127.0.0.1/files/20210301/d9488cdc6bbc44fb98987650fc98d86b.jpg" alt="" width="1680" height="1050" /></p>
"""
),
),
);
}
}
更多推荐
已为社区贡献2条内容
所有评论(0)