0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Flutter on the Webでタイトル属性を設定

Last updated at Posted at 2021-12-23

この記事は、「Flutter Advent Calendar 2021」に投稿した「Flutter on the WebをFirebase Hostingで公開した」の一部となります。

タイトルの設定

Flutter on the Webで、HTMLの<title>属性を設定するだけであれば、web/index.html<title></title>を直接設定すればよいだけです。
アプリ内で統一されているならこれで終わりです。

タイトルの動的変更

Titleウィジットで設定することができます。

main.dart
Widget build(BuildContext context) {
    final mytitle = '$house | $subTitle';
    return Title(
        color: Colors.white,
        title: mytitle,
        child: Scaffold(
                appBar: AdaptiveAppBar(pagepath: pagepath, title: mytitle),
                drawer: Drawer(
                    child: HorsesWidget()),
                body: Column(children: [
                  Expanded(flex: 1, child: body),
                  SizedBox(height: adHeight)
                ])));
}

Qiita

以上です。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?