万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    BottomNavigationBarについて

    BottomNavigationBar だと BottomNavigationBarItem の子が必須かもしれない。

    https://github.com/flutter/flutter/issues/17099

    ここの

     @override
      Widget build(BuildContext context) {
        return Scaffold(
          body: body,
          bottomNavigationBar: new BottomAppBar(
              child: new Row(
                mainAxisSize: MainAxisSize.max,
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                children: <Widget>[
                  IconButton(
                      icon: Icon(Icons.home),
                      disabledColor: Colors.green,
                      onPressed: _currentIndex == 0
                          ? null
                          : () => setState(() => _currentIndex = 0)),
                  IconButton(
                      icon: Icon(Icons.notifications),
                      disabledColor: Colors.green,
                      onPressed: _currentIndex == 1
                          ? null
                          : () => setState(() => _currentIndex = 1)),
                  IconButton(
                      icon: Icon(Icons.settings),
                      disabledColor: Colors.green,
                      onPressed: _currentIndex == 2
                          ? null
                          : () => setState(() => _currentIndex = 2)),
                ],
              )
          ),//bottomAppBar
        );
      }

    これならWidgetでいいかも?

    これ参考になるかな? Flutter Bottom Navigation Bar Android and IOS - Sarim Khan - Medium

    また FlutterでiOS風のBottomNavigationBarを実装する - HeavenOSK - Medium

    の bizz84さんのやつを見る?