[英]How do you set the page description in a flutter web app?
I know you can set the title of your web app with this code:我知道您可以使用以下代码设置 web 应用程序的标题:
MaterialApp(
title: 'App Title',
...
But is it possible to set the description meta tag the same way?但是是否有可能以相同的方式设置描述元标记?
By default mine is showing:默认情况下我的显示:
<meta name="description" content="A new Flutter project.">
The solution for my ended up being incredibly simple - I just needed to edit the file located at web/index.html
.我最终的解决方案非常简单——我只需要编辑位于
web/index.html
的文件。
I'm still not sure how one would set the description dynamically - but that's probably only a case for the select few that are trying to serve a flutter app that can be read by crawlers.我仍然不确定如何动态设置描述 - 但这可能只是 select 少数人试图为爬虫程序读取的 flutter 应用程序提供服务的情况。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.