坑🕳Tabbar

2018-07-27  本文已影响6人  _白羊

在Tabbar中设置tab选中与未选中样式

child: new TabBar(
  controller: tabController,
  labelColor: Color.fromRGBO(102, 68, 204, 1.0),  // tab选中标签色
   unselectedLabelColor: Color.fromRGBO(197, 198, 218, 1.0),  // tab未选中标签色
   indicator: BoxDecoration(),
  tabs: _navigationViews
        .map((NavigationIconView navigationView) => navigationView.item)
        .toList(),
 ),

tabs中的icon不能使用IconTheme设置样式,会导致样式冲突,直接用Icon

icon: const Icon(StudyInIcons.index),
上一篇 下一篇

猜你喜欢

热点阅读