How can you set title and icon for a flutter web app?
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 the
web` 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.
In order to change the title to what you desire, you need to add the parameter title
(Which is a String
) to your MaterialApp
widget.
return MaterialApp(
title: "MyTitle",
home: MyHomeWidget());