大印先生
2020-09-21 14:20
bottomNavigationBar: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
currentIndex: _currentIndex,
onTap: (index) {
setState(() {
_contentPagerController.jumpToPage(index);
_currentIndex = index;
});
},为什么 _contentPagerController.jumpToPage(index); 必须要写在setState方法外面, 写在里就变得无效了呢
还没有人回答问题,可以看看其他问题
【Flutter入门】3小时完成微信读书发现界面
4347 学习 · 32 问题
相似问题