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

后端 未结 2 1781
悲哀的现实
悲哀的现实 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

    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());
    

提交回复
热议问题