我想知道如何在每个位置添加点击项。我已经在图标上添加了手势检测器,但是随后丢失了动画。
import 'package:curved_navigation_bar/curved_navigation_bar.dart';
bottomNavigationBar: CurvedNavigationBar(
key: _bottomNavigationKey,
index: 2,
height: h/15,
items: <Widget>[
Icon(Icons.home, size: h/25),
Icon(Icons.playlist_add_check, size: h/25),
Icon(Icons.camera, size:h/18,color: Colors.black,),
Icon(Icons.message, size: h/25),
Icon(Icons.layers_clear, size: h/25),
],
color: Colors.white,
buttonBackgroundColor:Colors.white,
backgroundColor: Colors.transparent,
animationCurve: Curves.easeInOut,
animationDuration: Duration(milliseconds: 150),
onTap: (index) {
setState(() {
_page = index;
});
},
),