How can you set title and icon for a flutter web app?

后端 未结 2 1778
悲哀的现实
悲哀的现实 2020-12-21 07:29

What I\'m trying to do is build a flutter web app that, when displayed in the browser, the tab shows an icon and a title (as currently it only shows the world icon and the l

2条回答
  •  爱一瞬间的悲伤
    2020-12-21 07:50

    Assuming you already have a favicon.ico file, placing it inside the your_project_dir\web folder alongside index.html as shown below is enough for the browser to pick it up.

    Following is the result of placing a favicon.ico' in theweb` folder. Make sure to do a clean build.

    In other case you can manually mention it using the link tag inside your index.html as explained here in this Wikipedia page.

提交回复
热议问题