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さんのやつを見る?